Archived

This topic is now archived and is closed to further replies.

robpearmain

DirectX 3D in a Picturebox or Panel on a Form C#.NET

Recommended Posts

Hello, I am trying to make an app, with full windows functionality in C#.NET with Menus etc, and a small DX3D display area for the image. I am trying to use the Picturebox or Panel control to no avail. Does anyone have any example code I could use Many thanks

Share this post


Link to post
Share on other sites
Hi,

I think you can use any Control... but I''ve only tested this with a Panel.

Just pass the panel object (in this case, myPanel) to the constructor of the D3D Device like this:

Device pDevice = new Device(0, DeviceType.Hardware, myPanel, CreateFlags.SoftwareVertexProcessing, presentParams);

Hope this helps.

Tim

Share this post


Link to post
Share on other sites