Trooper |
Posted - Jul 02 2004 : 7:17:50 PM Hello, I am using MS VB.net stand. Ed. 2003
I"m having trouble with DirectX7 in vb.net. I only want to do 2D stuff, thats why I"m using 7.I put in
dim dx as DirectX7
and it says DirectX not defined. Could anyone help? Thanks. |
Sr. Guapo |
Posted - Jul 02 2004 : 7:38:03 PM Don't know if it is possible in .NET, but this should work...
You must reference the DirectX7 dll. Goto Project->"Add Reference..." click the COM tab and scroll down to the DirectX 7 for Visual Basic Type Library. Then, in all the classes/modules/forms that require DX7, add the line: "imports DxVBLib". That should let you use DX7...
A better option may to use DirectX7 through DirectX9. DX9 provides a new interface for DX7, and would work much better with .NET...
An even better option is to use DirectGraphics9 to do 2D rendering. It is very easy, possibly easier than DirectDraw (not sure, never used it...). There are many tutorials on doing this, includind the DX9 tutorial on DirectX4VB.com... The managed DX interface plays much nicer with .NET than COM, so you will have less problems in the long run. Also, It provides a nice foundation to learn Direct3D later on.
Hope that helps a little... |
|
|