dellanooch Posted January 4, 2003 Posted January 4, 2003 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 Quote
*Gurus* divil Posted January 4, 2003 *Gurus* Posted January 4, 2003 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. Quote 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* Nerseus Posted January 4, 2003 *Experts* Posted January 4, 2003 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 Quote "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
dellanooch Posted January 4, 2003 Author Posted January 4, 2003 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. Quote
*Experts* Nerseus Posted January 5, 2003 *Experts* Posted January 5, 2003 When you setup your PresentParameters, just set the DeviceWindow to the PictureBox control. Also, for obvious reasons, choose Windowed mode :) -Nerseus Quote "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
Steuernol Posted January 31, 2003 Posted January 31, 2003 Or when you create the Device one of the constructors takes a control as a parameter. It will then render to this control. Quote
shouzama Posted January 31, 2003 Posted January 31, 2003 Take a look at THIS TUTORIAL (from DirectX4VB). It renders D3D to a Window, and with VERY LITTLE work, you can use it to render in a picturebox (I already did that and it worked perfectly) Quote
Jelly Donut Man Posted February 2, 2003 Posted February 2, 2003 Device = New Device(0, DeviceType.Hardware, PictureBox.Handle, CreateFlags.HardwareVertexProcessing, PresentParams) Works for me. If that's what your asking. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.