From: Louis B. <lb...@li...> - 2001-07-02 11:29:41
|
I have written a nifty gui that I really like using the win32 gui=20 module. I really have to thank the person(S) who put this all together. On to my question... I would like to design a menu containing an exit routine but it is not=20 working. Currently I have this as my program loop while (1) { Some repetitive code.... Win32::GUI::DoEvents() while Win32::GUI::PeekMessage(0,0,0); exit(0) if !$W->IsEnabled(); } exit(0); And I have a quit button that exits with this code: sub Quitb_Click { exit(0); } Now this works great while it is a button. But when I try to make this=20 menu it does not work. Actually it does work, however; when I convert the= =20 program to an exe and then click on the exit menu I get an error. So reading a bit I figured that I need to change the menu to some thing=20 like this: sub Exit_Click {$W->PostQuitMessage(0);} Now I know that this sub is executing because I can put a print in it and I= =20 will see it on the console window. However, it is not quitting the=20 program. How do I do that??? Thanks, Louis -- =A4=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0= =BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 =A4=B0`=B0Lightbridge, Inc =A4=B0`=B067 South Bedford St. =A4=B0`=B0Burlington MA 01832 =A4=B0`=B0781.359.4795 mailto:lb...@li... =A4=B0`=B0http://www.lightbridge.com =A4=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0= =BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 |