Post

 Resources 

Console

Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VBGamer
 VBGamer
 VB.net
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Trooper
Neophyte

6 Posts

Posted - Jul 02 2004 :  7:17:50 PM  Show Profile  Send Trooper an AOL message  Reply with Quote
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
Swordmaster

USA
272 Posts

Posted - Jul 02 2004 :  7:38:03 PM  Show Profile  Reply with Quote
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...


Edited by - Sr. Guapo on Jul 02 2004 7:38:44 PM
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
VBGamer © Go To Top Of Page
This page was generated in 0.09 seconds. Snitz Forums 2000

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.