WaitWindowEvent freeze my software :-(

Just starting out? Need help? Post your questions and find answers here.
TheCorporation
User
User
Posts: 11
Joined: Fri Sep 15, 2006 8:04 am
Location: FR

WaitWindowEvent freeze my software :-(

Post 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).
milan1612
Addict
Addict
Posts: 894
Joined: Thu Apr 05, 2007 12:15 am
Location: Nuremberg, Germany
Contact:

Post by milan1612 »

Hi,
we need some code to help you :?
Windows 7 & PureBasic 4.4
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post 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.
quidquid Latine dictum sit altum videtur
TheCorporation
User
User
Posts: 11
Joined: Fri Sep 15, 2006 8:04 am
Location: FR

Post by TheCorporation »

Thank you very much freak :D now it works 100% !.
Post Reply