From: Louis B. <lb...@li...> - 2001-06-27 12:34:42
|
Help please, I am trying get this program to completely terminate when I click on the X= =20 in the top right hand corner but it is not working. I have played around=20 with a few different ways to use peekmessage and doevents with no luck. Can some one help me. I do not see anything in the archives like this. Thanks, Louis use Win32::GUI; $W =3D new Win32::GUI::Window( -title =3D> "Win32::GUI::Louis Test", -left =3D> 100, -top =3D> 100, -width =3D> 200, -height =3D> 150, -font =3D> $F, -name =3D> "Window", ); $tX =3D 5; $W->AddLabel( -name =3D> "Fatal_Label", -text =3D> "Fatal:", -left =3D> $tX, -top =3D> 5, ); $tX =3D 5; $tY +=3D $W->Fatal_Label->Height + 10; $W->AddLabel( -name =3D> "Warning_Label", -text =3D> "Warning:", -left =3D> $tX, -top =3D> $tY, ); $tX_Fatal +=3D $W->Fatal_Label->Width + 27; $tX_Warning +=3D $W->Warning_Label->Width + 10; $W->Show; for ($i =3D 0; $i <=3D10; $i++) { $W->AddTextfield( -name =3D> "Fatal_Text", -left =3D> $tX_Fatal, -top =3D> 5, -width =3D> 80, -height =3D> 20, -text =3D> $i, ); $W->AddTextfield( -name =3D> "Warning_Text", -left =3D> $tX_Warning, -top =3D> $tY, -width =3D> 80, -height =3D> 20, -text =3D> "test2", ); print "$i\n"; Win32::GUI::PeekMessage(0,0,0); Win32::GUI::DoEvents() < 0; sleep(2); } sub W_Terminate {-1;} -- =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 |