For those that prefer the "Please don't do that, Mr./Ms. user" approach, you can use Win32::Lanman module to catch the WTS event of the user disconnecting (as opposed to logging out) and send them email with a little explanatory message. I wrote a service that did that a couple years ago, worked fairly persnickety, though I never used it in production.
Kevin Gould Sr. I/T Specialist Gentiva Health Services, Overland Park, KS 913-814-2369 -----Original Message----- From: MJG [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 21, 2003 5:48 AM To: [EMAIL PROTECTED] Subject: RE: X Button That's interesting. It's actually an API call with user32.dll. Just can't find the info. May not have been an activestate group. -----Original Message----- From: Lynn. Rickards [mailto:[EMAIL PROTECTED] Sent: Monday, October 20, 2003 9:56 PM To: MJG; [EMAIL PROTECTED] Subject: RE: X Button > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Behalf Of MJG > Sent: Monday, October 20, 2003 9:39 PM > To: [EMAIL PROTECTED]; > [EMAIL PROTECTED] > Subject: RE: X Button > > > This has my curiosity up now. would pressing the "X" on a window > generate a signal that could be trapped? If this was a window created > by Win32::GUI or TK, then this might be simple. > > -----Original Message----- > From: Gould, Kevin [mailto:[EMAIL PROTECTED] > Sent: Monday, October 20, 2003 5:24 PM > To: MJG; [EMAIL PROTECTED]; > [EMAIL PROTECTED] > Subject: RE: X Button > > > Search for a utility called AppScape. > > -----Original Message----- > From: MJG [mailto:[EMAIL PROTECTED] > Sent: Monday, October 20, 2003 4:54 PM > To: [EMAIL PROTECTED]; > [EMAIL PROTECTED] > Subject: X Button > > Does anyone know right of the top of their head if there is a way to > stifle the ability for someone to hit the X button on a window? This > would be in a Terminal Server Environment and it would prevent a user > from creating a disconnected session. > > Thanks > Simple it is with Tk... use Tk; my $mw = tkinit; $mw->protocol(WM_DELETE_WINDOW => sub {print "Can\'t!\n";}); my $f = $mw->Frame; Tk::grid($f, -row => 0, -column => 0, -sticky => 'nsew', ); $f->Button(-text => "Quit", -command => sub { $mw->destroy; print "Byeee\n"; }, )->Tk::grid(-row => 0,-column => 1,-sticky => 'nsew'); MainLoop; -Lynn. _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
