Page 1 of 1

WaitWindowEvent freeze my software :-(

Posted: Mon Jul 16, 2007 7:54 pm
by TheCorporation
WaitWindowEvent "freeze" my software :-(

I run a windows software that saves picture from my webcam every second.

I don't need to use the software once running, the problem is taht it seems that WaitWindowEvent disable my software a few seconds (3 to 6), and as soon I move the mouse on my software windows it goes back to life (saving a picture each second).

My CPU is not overloaded (2% maximum). XP SP 2. PB v4.00

Any tip ? (without using threads please because I'm a beginner).

Posted: Mon Jul 16, 2007 7:56 pm
by milan1612
Hi,
we need some code to help you :?

Posted: Mon Jul 16, 2007 7:58 pm
by freak
WaitWindowEvent() halts the program until input events happen (thats why moving the mouse over it helps)
Just use the command with a timeout like WaitWindowEvent(200) which makes
the command return after 200 milliseconds even if there were no events.

Posted: Mon Jul 16, 2007 8:28 pm
by TheCorporation
Thank you very much freak :D now it works 100% !.