Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Maybe not necessarily a picture box control, but some sort of way of rendering to a confined area (not just the entire face of the form). Anyone have a way of doing this? A link to a tutorial or some sort of reference would be WONDERFUL.

 

- Andrew

  • *Gurus*
Posted
Which version of DirectX? I only tried DX9 briefly but I seem to remember it accepting a parameter of type Control as a place to render to, so instead of passing a form you could try passing a Panel or PictureBox instead.

MVP, Visual Developer - .NET

 

Now you see why evil will always triumph - because good is dumb.

 

My free .NET Windows Forms Controls and Articles

  • *Experts*
Posted

DX9 (the only officially supported version of DirectX that works with .NET) has a project template that will create a Direct3D project that writes to a picturebox control. When you select new project, select the DirectX project type. A wizard will come up asking for some parameters. I think it's the "Project Settings" page of the wizard that allows you to select a PictureBox.

 

-Ner

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Posted

Ah yes, Nerseus. Thanks for pointing that out. But if you remember from other thread about the missing files I can't completely generate an error-free directx project. But regardless I think I'll be able to figure it out.

 

Thanks guys.

  • *Experts*
Posted

When you setup your PresentParameters, just set the DeviceWindow to the PictureBox control. Also, for obvious reasons, choose Windowed mode :)

 

-Nerseus

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
  • 4 weeks later...

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...