Useful for the case when you want to do things that are not window driven, and don't want to fork them into a separate process. Then the GUI becomes less responsive (because you are doing something else sometimes), but, as long as the chunks of something else are not too big, it need not become too unresponsive. So then you can interrupt your things that are not window driven to respond to the user's events.
$keep_running = 1; while ($keep_running) { Win32::GUI::DoEvents; do something_else; } [EMAIL PROTECTED] wrote: > IN the documentation, I find this about DoEvents: > > Just like Dialog(), but returns when there are no more events to > process. > > So does that mean that if you leave your window alone, control will > return to the script? So to keep your script from exiting as soon as > you stop clicking buttons, etc. you'd have to do something like this: > > $keep_running = 1; > > Win32::GUI::DoEvents while ($keep_running); > > and then do something in one of your events that changes > $keep_running. So wouldn't it be easier just to use Dialog and have > that event return -1? I guess what I'm really asking here is, what > are the pros and cons of DoEvents over Dialog? And if someone could > provide an example of a script that uses DoEvents, that would be > good. > > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Perl-Win32-GUI-Users@lists.sourceforge.net > http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users -- Glenn ===== Due to the current economic situation, the light at the end of the tunnel will be turned off until further notice.