L
Lloyd Dupont
I'm doing kind of custom ShowDialog() function, for a class of popping
control.
roughly in it I have
ShowModal()
{
BringToFront()
modal = true;
while(modal)
Application.DoEvents();
}
the problem is, when I tru this on the desktop my CPU usage goes up to 100%
I try to add a Thread.Sleep() before DoEvents(), but that doesn't help.
any way of doing that without having a 100% CPU usage ?
control.
roughly in it I have
ShowModal()
{
BringToFront()
modal = true;
while(modal)
Application.DoEvents();
}
the problem is, when I tru this on the desktop my CPU usage goes up to 100%
I try to add a Thread.Sleep() before DoEvents(), but that doesn't help.
any way of doing that without having a 100% CPU usage ?