Ok...here's my little program that I used and then incorporated it into my
production script.

---    Felice

use Win32::GUI;

$screen_width  = Win32::GUI::GetSystemMetrics(0);
$screen_height = Win32::GUI::GetSystemMetrics(1);

#-----------------------------------#
#     Splash (Startup) Window       #
#-----------------------------------#

$S_width  = 200,
$S_height = 100,

$S = new Win32::GUI::Window(
          -name     => "SplashWindow",
          -left     => ($screen_width - $S_width) / 2,
          -top => ($screen_height - $S_height) / 2,
          -width    => $S_width,
          -height => $S_height,
          -text     => "Welcome",
          -style    => WS_BORDER,
     );

$SplashFont = new Win32::GUI::Font(
          -name      => "Arial",
          -size      => 16,
     );


$S->AddLabel(
          -name     => "lblStartup",
          -left     => 0,
          -top => 20,
          -width    => $S_width,
          -height   => 30,
          -text     => "Please wait...",
          -font   => $SplashFont,
          -align  => center,
     );

$S->AddTimer("SplashOver", 5000);

#-----------------------------------#
#              Main Window          #
#-----------------------------------#

$M_width  = 260,
$M_height = 160,


$M = new Win32::GUI::DialogBox(
          -name     => "MainWindow",
          -left     => ($screen_width - $M_width) / 2,
          -top => ($screen_height - $M_height) / 2,
          -width    => $M_width,
          -height => $M_height,
          -text     => "Testing",
          -style    => WS_BORDER | WS_CAPTION,
     );



$M->AddLabel(
          -name     => "lblOne",
          -left     => 10,
          -top => 20,
          -width    => 50,
          -height   => 22,
          -text     => "FirstName:"
     );

$M->AddTextfield(
          -name     => "txtOne",
          -left     => 70,
          -top => 20,
          -width    => 150,
          -height   => 22,
          -tabstop=> 1,
     );

$M->AddLabel(
          -name     => "lblTwo",
          -left     => 10,
          -top => 40,
          -width    => 50,
          -height   => 22,
          -text     => "LastName:"
     );

$M->AddTextfield(
          -name     => "txtTwo",
          -left     => 70,
          -top => 40,
          -width    => 150,
          -height   => 22,
          -tabstop=> 1,
     );


$M->AddButton(
          -name     => "cmdExit",
          -left     => 100,
          -top => 100,
          -width    => 50,
          -text     => "Exit",
          -tabstop=> 1,
     );

$Notefont = new Win32::GUI::Font(
          -name      => "Arial",
          -size      => 16,
     );


#-----------------------------------#
#              Do Stuff             #
#-----------------------------------#

$S->Show;
$M->Hide;

$M->txtOne->Text("Felice");
$M->txtTwo->Text("Vittoria");

Win32::GUI::Dialog();


#-----------------------------------#
#           Window  Events          #
#-----------------------------------#

sub SplashOver_Timer {
     $S->Hide;
     $M->Show;
}

sub cmdExit_Click { return -1; }




David Hiltz <[EMAIL PROTECTED]> on 08/10/99 02:49:01 PM

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:    (bcc: Felice Vittoria/Aut/Schneider)
Subject:  Re: [perl-win32-gui] startup screen




> Thanks for your help but I found the problem.      I hate to say what the
> problem was 'cause it was right under my nose :)

  would still like to know what you mean by a "startup screen" and see your
  code?







Reply via email to