Thanks for that help. Seems to be just what I wanted.

From: [] On Behalf Of Emmanuel E
Sent: Thursday, 24 April 2008 1:31 a.m.
Subject: Re: [perl-win32-gui-users] Window doesn't appear until codehas finished

I think he means he wants to use threads. So that one thread can take care of the window in the foreground and another the code in the background...

Ilya BANDORIN wrote:

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: [] On Behalf Of Brian Rowlands (Greymouth High School)
Sent: Wednesday, April 23, 2008 4:06 PM
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. 


------------------------------------------------------------------------- This email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2.;198757673;13503038;p?

_______________________________________________ Perl-Win32-GUI-Users mailing list