Problem with a Progress bar

Linux specific forum
Fred
Administrator
Administrator
Posts: 18499
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

You can try to flush the events with "while windowevent() : wend"
Armoured
Enthusiast
Enthusiast
Posts: 365
Joined: Mon Jan 26, 2004 11:39 am
Location: ITALY
Contact:

Post by Armoured »

Fred wrote:You can try to flush the events with "while windowevent() : wend"
Thanks Fred and AND51 ;)
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

Post by AND51 »

Fred wrote:You can try to flush the events with "while windowevent() : wend"
But not inside the thread! The thread cannot use WindowEvent() to receive events from windows that were not created by it.

In my current project, the main program creates a window and receives the WindowEvents. The thread updates the progressbar periodically with the method I described above.

The main thread, however (and that is the trick), does not use WaitWindowEvent(), but WaitWindowEvent(200), so even if there is no incoming event, the timeout will cause the program to update the progressbar.

Understand? :wink:

Happy coding, AND51
PB 4.30

Code: Select all

onErrorGoto(?Fred)
Post Reply