Creating a game interface

Hello

I have just started working with DirectX 9.0c and I have some questions about creating game interface.

I am using Visual Studio 2005, C# and managed DirectX.

1) For egxample, I have got a form in VS2005. I would like to use Windows forms controls (like buttons, checkboxes and so on) for creating user interface, and a 3D model would be rendered in a panel (still Windows forms control) by DirectX. Buttons and other interface controls should be over the panel (just over the panel, not a children of it). But after rendering, when I run my app, will I see created interface? If DirectX context is rendered firstly, will the the created interface be over the panel? If not, what are the other ways to create GUI with Windows Forms and a DirectX content in background?

2) Does this way for creating UI decrese the performance of app?

3) Is it possible to use .NET Framework 3.0 controls (like a grid) instead the panel for rendering 3D in DirectX?

Thanks in advance.

[1015 byte] By [Kestutis] at [2007-12-23]
# 1

Windows forms and a DirectX device context are rendered separately. If you are looking to do rendered UI controls (like checkboxes, buttons, etc) inside of a device context, look at the CustomUI sample in the SDK.

DavidWeller-MSFT at 2007-8-30 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: DirectX 101...
# 2

Kestutis,

Did you ever get this working? If so, can you tell us how you did it?

I also want to take advantage of the Windows Forms GUI Components and do not want to use rendered GUIs.

Cheers,

DD

DormantDemon at 2007-8-30 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: DirectX 101...
# 3

It got this working.

For doing that, I opened the first tutorial in the Microsoft DirectX 9.0 SDK Update (Summer 2004) (DirectX for managed languages) and dragged controls which I wanted onto a given form. C# wrote a code behind the form which creates the UI. And that's all.

Kestutis

Kestutis at 2007-8-31 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: DirectX 101...