in reply to Re^4: Release Button in Click
in thread Release Button in Click
It could be that the code in the event handler is taking a long time to complete, which means Win32::GUI won't have a chance to update the GUI, and the program will appear to hang. This includes redrawing controls. So if a lengthy piece of code is executed when a button is pressed, it will remain pressed until the code returns to the dialog loop. One solution to this problem is to periodically call Win32::GUI::DoEvents() in your code to allow Win32::GUI to process any pending events. Example:
sub Button_Click { while(1){ # do something... Win32::GUI::DoEvents(); } return 1; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Release Button in Click
by tcopeck (Initiate) on Sep 22, 2010 at 09:14 UTC | |
by kejohm (Hermit) on Sep 22, 2010 at 12:15 UTC |