This is easy: set a timer. use Win32::GUI;
my $Window = new Win32::GUI::Window ( -name => "Window", -topmost => 1, -left => 300, -dialogui => 1, -top => 400, -width => 258, -height => 280, -text => "Blah", ); $Window->Center(); my $Timer = $Window->AddTimer("TimedOperation", 500); $Window->Show(); $Window->Enable(); Win32::GUI::Dialog(); sub Window_Terminate { print "Closing\n"; return -1; } sub TimedOperation_Timer { #do some stuff here $Timer->Kill(); for (my $a =0; $a <10; $a++) { select(undef, undef, undef, .05); print $a, "\n"; } return -1 # this ends the Win32::GUI::Dialog # phase and IF you have more stuff in the script # it runs to completion. # OR call Window_Terminate() if you # want some clean up stuff done first. } The only thing you really need to look out for it how long it takes to do your action before quiting. Of course, you could just not show the window at all (do not call $Window->Show()), otherwise, the end user could still quit using the "X" button in the corner. There is a way to remove the "X" and other TitleBar controls, but I am not sure exactly what the right combo of parameters on the Window creation would be. The docs can help with that. Also, there is a way to create windows with no TitleBar at all, but again, I do not remember how to do this off the top of my head. Joe Frazier, Jr. Senior Support Engineer Peopleclick Service Support Tel: +1-800-841-2365 E-Mail: [EMAIL PROTECTED] > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Glenn Linderman > Sent: Thursday, June 02, 2005 20:29 > To: Jim Hansen > Cc: perl-win32-gui-users@lists.sourceforge.net > Subject: Re: [perl-win32-gui-users] Button Questions > > On approximately 6/2/2005 2:28 PM, came the following > characters from the keyboard of Jim Hansen: > > Is it possible to create a Window that does not need > buttons to jump > > to a subroutine or exit. > > > > I would like to have a window that automatically continues to a > > subroutine without having to be initiated by the user, then > when the > > subroutine processing is complete, destroy the window > without an exit > > button. > > Well, I don't know exactly what you mean by "continues > automatically to a subroutine" ... > > It is certainly possible to write a subroutine that Show()s a > previously created window, continues processing, and at the > end Hide()s the window. > > You will need to also call DoEvents at strategic points to > get it to actually display or update, if you wish it to be > visible, and if you wish to update the content. > > Otherwise, this should be relatively straightforward. > > > > > Thanks > > > > > ---------------------------------------------------------------------- > > -- > > Yahoo! Mail > > Stay connected, organized, and protected. Take the tour > > <http://tour.mail.yahoo.com/mailtour.html> > > -- > Glenn -- http://nevcal.com/ > =========================== > Having identified a vast realm of ignorance, Wolfram is > saying that much of this realm lies forever outside the light > cone of human knowledge. > -- Michael Swaine, Dr Dobbs > Journal, Sept 2002 > > > ------------------------------------------------------- > This SF.Net email is sponsored by Yahoo. > Introducing Yahoo! Search Developer Network - Create apps using Yahoo! > Search APIs Find out how you can build Yahoo! directly into your own > Applications - visit > http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Perl-Win32-GUI-Users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users >