What do you mean by “in background”?


If you wish to perform some tasks “in background” while user sees login window, enters his login/pass, etc - I think the only way is to create a multithreaded application.


But if you just want to create/show window and then perform some extra code, you can call Win32::GUI::DoEvent instead of Win32::GUI::Dialog(). It will draw the window and all stuff but won’t “stop” for interaction with user. Of course you should call Win32::GUI::Dialog() at some point to allow user to interact with your application.



From: perl-win32-gui-users-bounces@lists.sourceforge.net [mailto:perl-win32-gui-users-bounces@lists.sourceforge.net] On Behalf Of Brian Rowlands (Greymouth High School)
Sent: Wednesday, April 23, 2008 4:06 PM
To: perl-win32-gui-users@lists.sourceforge.net
Subject: [perl-win32-gui-users] Window doesn't appear until code has finished


I'm writing a login gui in perl and I've got a mental block:

I've created my gui:

my $main = Win32::GUI::Window->new(
        -name   => 'Main',
        -width  => 600,
        -height => 400,
        -text   => 'GHS Login',
        -sizable=> 0,
        -hasminimize => 0,
        -hasmaximize=> 0,
… widgets positioned

My question is, how can I get the  window to be displayed and then have perl code running in the background?
I've tried:
sub Main_Activate {
        … perl code
return 0;
The perl code runs and then the window appears.


Brian Rowlands
We must accept finite disappointment, but we must never lose infinite hope.
Martin Luther King Jr.



Ce message et toutes les pieces jointes (ci-apres le "message") 
sont confidentiels et etablis a l'intention exclusive de ses destinataires.
Toute utilisation ou diffusion non autorisee est interdite. 
Tout message electronique est susceptible d'alteration. 
La SOCIETE GENERALE et ses filiales declinent toute responsabilite
au titre de ce message s'il a ete altere, deforme ou falsifie.

This message and any attachments (the "message") are confidential
and intended solely for the addressees.
Any unauthorized use or dissemination is prohibited. 
E-mails are susceptible to alteration.   
Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates
shall be liable for the message if altered, changed or falsified.