Help a Noob! - MDX 9 and child forms -

Mikey0727

Member
Joined
Mar 26, 2005
Messages
5
Hi,

I just started learning C# and Managed directx 9. Im trying to Set up my project to have a Parent form, and have directx render the child forms. I have a poor attempt at doing this attached below, but it just crashes and throws an exception.

I am using .Net 2003

Can someone please explain where I went wrong?

Thanks
 

Attachments

Last edited by a moderator:
The problem is that you are initializing the D3D device and trying to use it before you show the form, while putting the form in a inifite loop of redrawing before the window even has a chance to finish loading. My advice is that, first create the window, take care of all the properties (MDI, text, etc.) and then create a separate method that you will call after, which will perform Direct3D initialization. That what I did with your code, and it worked happily ever after! (If you need help implementing that, just post, but the thrill of doing that on your own will be worth it! :D)
 
Back
Top