Rob,

 

I used your Splashscreen module in my latest project. I noticed an ugly
little flash at times between when the splash window is created and when it
is centred on the screen. The adaptation to the module example below
demonstrates it when you press the button. It's not a major problem but it
is a little more pronounced in my application. Adding the option "-visible
=> 0" to the splash window creation stanza in the module seems to fix it.

 

Glenn

 

#!perl -w

use strict;

use warnings;

 

use Win32::GUI;

use Win32::GUI::SplashScreen;

 

# Create and diaplay the splash screen

# Uses default filename of 'SPLASH', and searches for

# SPLASH.bmp and SPLASH.jp[e]g

Win32::GUI::SplashScreen::Show();

 

# Create the main window

my $mw = Win32::GUI::Window->new(

        -title  => "SplashScreen Demo 1",

        -size   => [700, 500],

) or die "Creating Main Window";

 

$mw->AddListView(

                        -size     => [ 600, 400 ],

                        -pos      => [0, 0 ],

);

 

$mw->AddButton (

                        -size     => [ 60, 24 ],

                        -pos      => [ 610, 10 ],

                        -text      => "Splash",

                        -onClick            => sub {
Win32::GUI::SplashScreen::Show() },

);

                        

# do some other stuff

sleep(1);

 

# show the main window and enter the dialog phase

# splash screen taken down after (default) 3 seconds

$mw->Center();

$mw->Show();

Win32::GUI::Dialog();

exit(0);

Reply via email to