DX9 Window crawls when created by Form???

ScalarWave

Newcomer
Joined
Jan 27, 2005
Messages
3
I am writing a .NET C# application which launches a Windows Form. I want to be able to create a new form at run-time onto which I can draw with managed DX9. My problem is, that a simple dx9 window, in which I have overloaded OnPaint() to display a spinning cube, and which works flawlessly when launched as the app's main form, slows to a crawl when instantiated by an existing form. Is this because .NET regards my second window as a child of the first in a manner that slows rendering?

My entry point :

static void Main()
{
using (frmLaunchTab launchTab = new frmLaunchTab())
{
Application.Run(launchTab);
//Application.Run(frmViewscreen); //this works//
}
}

On MouseClick I want to open my dx9 viewscreen :

private void frmLaunchTab_MouseClick_Load(object sender, EventArgs e)
{
viewscreen = new frmViewscreen();
viewscreen.show(); // the screen opens, but my cpu pegs and fps crawls
}
 
Back
Top