Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (edited)

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

PROJ.zip

Edited by PlausiblyDamp
  • *Experts*
Posted
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)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...