RE: Trap window close
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of [EMAIL PROTECTED] > Sent: August 25, 2005 3:06 AM > To: perl-win32-users@listserv.ActiveState.com > Subject: Trap window close > > Hi, > > Have looked at sigint to trap the "window close" event but am > a little lost. > > We run some scripts in cmd prompt windows on win2k and I > would like to ignore it if someone accidentally clicks the > 'x' to close the window. Is that possible? Does someone have > a bit of code? > I posted some code such as this a couple of years back. It got reposted on this list .. http://aspn.activestate.com/ASPN/Mail/Message/1467974 You will have to obviously edit it for your needs - but it shows that it is possible to do. Jack ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Trap window close
- Original Message - From: <[EMAIL PROTECTED]> To: Sent: Thursday, August 25, 2005 7:05 PM Subject: Trap window close > Hi, > > Have looked at sigint to trap the "window close" event but am a little lost. Also took a look in MSDN, but got the impression that such events applied only to web browser windows. > > We run some scripts in cmd prompt windows on win2k and I would like to > ignore it if someone accidentally clicks the 'x' to close the window. Is > that possible? Does someone have a bit of code? > You want to distinguish between an *accidental* click on 'x' and a *deliberate* click on 'x' ?? (Of course you don't I'm just being facetious :-) Have you played with the idea of having the console window created by "Administrator" ? I'm thinking that such a window could not be closed by "User" (though that "thought" is untested). Perhaps 'perldoc Win32::Process' and 'runas /?' could provide useful ideas in that regard. SIG{INT} traps should work fine on Windows NT/2000/XP, but afaik, such traps/handlers work only with regards to Ctrl-C, not with clicking on 'x'. I'm no expert ... hopefully any incorrect statements I've made will be corrected by those "in the know" stay tuned :-) Cheers, Rob ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Trap window close
Hi, Have looked at sigint to trap the "window close" event but am a little lost. We run some scripts in cmd prompt windows on win2k and I would like to ignore it if someone accidentally clicks the 'x' to close the window. Is that possible? Does someone have a bit of code? Many thanks Peter. __ This message may contain privileged information. If you have received this message by mistake, please keep it confidential and return it to the sender. Although we have taken steps to minimise the risk of transmitting software viruses, the EBRD accepts no liability for any loss or damage caused by computer viruses and would advise you to carry out your own virus checks. The contents of this e-mail do not necessarily represent the views of the EBRD. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs