Dragoslav Zaric

I have simple question.

I want to have some area in form for directX animation (not whole area of form) because I need some space in form for other stuff, buttons etc.

I am using Microsoft Visual Studio 2005, managed directX 9 and C#

I managed something but that is not it, so if someone can help ...

thanks




Re: Game Technologies: Graphics Area in Form for DirectX stuff

Pieter Germishuys

Use a panel to render on.
Just place a panel on your form and render to the panel. Just pass the panel's handle to the device's constructor and you should be set.

I hope this helps.
Take care.





Re: Game Technologies: Graphics Area in Form for DirectX stuff

Dragoslav Zaric

Sorry,

I didn't wrote that this is the way I tried and it didn't work. I set up device like this:

device = new Device(0, DeviceType.Hardware, this.panel1, CreateFlags.SoftwareVertexProcessing, presentParams);

And this worked for panel area to be directX area, but other stuff on form like buttons are not visible !!

I also added this line of code (SetStyle) in Form1 constructor :

public Form1()

{

InitializeComponent();

this.SetStyle(ControlStyles.AllPaintingInWmPaint , true);

}

But after this places where are buttons are just white spaces,without buttons interfaces.

thanks