Chris (mc_funkymcmeep) wrote in 3dgraphics,
Chris
mc_funkymcmeep
3dgraphics

Visual Basic .NET Direct3D programming

I'm trying to get a simple 3D program going with Visual Basic .NET.
The major problems I'm running into are; I can't find a tutorial for .NET (only 6) and the one I'm trying to use for VB6 has got me stuck.

I'm using this tutorial:

http://www.gamedev.net/reference/programming/features/dxgvb1/page2.asp

Where I'm getting stuck is:
D3DDevice = D3D.CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, _
frmMain.hWnd, _
D3DCREATE_SOFTWARE_VERTEXPROCESSING, _
D3DWindow)

which I converted to:
D3DDevice = D3D.CreateDevice(0, CONST_D3DDEVTYPE.D3DDEVTYPE_HAL, ? , CONST_D3DCREATEFLAGS.D3DCREATE_SOFTWARE_VERTEXPROCESSING, D3DWindow)

The problem I am currently running into is where "frmMain.hWnd" was on their's, I can't figure out how to get that to work in VB.net, "frmMain.hWnd" doesn't work (I've made a form named frmMain) and it needs an integer return. A little trip through the MSDN library shows that the .net equivleant of hWND is .Handle, which doesn't seem to work either.

What can I do about it? Thanks
  • Post a new comment

    Error

    default userpic
  • 2 comments