From: Jeremy A. <bc...@te...> - 2001-04-24 22:24:26
|
At 02:54 PM 24/04/2001 -0700, you wrote: Hi, You may want to see my script attached. I still don't quite understand how to get the cancel to work while download is in progress. I always appreciate your help, as I am new to gui development. thankyou. Jeremy >| is there a way for it to listen while it downloads for the >| cancel event? >Your sub Cancel_Click should NOT exit, however, the exit statement is never >reached due to the return. >Return -1 is correct, this is how you tell the GUI to end the message loop. >Now the message loop exits back into your script from where it was called. >At this point, YOU must watch for the GUI to exit: > >last if Win32::GUI::DoEvents() < 0; > >instead of just Win32::GUI::DoEvents(); > >The chain goes: >1) you call Dialog() or DoEvents() inside GUI >2) GUI calls subs according to messages - like Cancel_Click when Exit button >is clicked. >3) your sub is active >4) your sub returns -1 >5) GUI stops looking for messages and returns -1 >6) your script continues > >Have fun, >Harald > >_______________________________________________ >Perl-Win32-GUI-Users mailing list >Per...@li... >http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > |