10 entries, 1 page |
QuoteBEGIN {
$image = "e:\\perl\\projekte\\adr_gui\\logo.bmp";
$width = '158';
$height = '129';
$title = "Splish,Splash";
$overrideredirect = "1";
require Tk::Splash;
$splash = Tk::Splash->Show($image, $width, $height, $title, $overrideredirect);
sleep 10;
Quote}
$splash->Destroy;
....res6t des Proggies ....
cu
1
2
3
$var = 0;
$mw->after(10000, sub { $var = 1 }); # 10 s warten
$mw->waitVariable(\$var);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
sub splash ($) {
# -----------------------------------------------------------------------------
# sub : s p l a s h
# -----------------------------------------------------------------------------
# Autor : CD
# Aufgabe : Zeigt einen Splash-Screen zu Beginn des Programms an.
# Parameter : Referenz auf auszuführende Funktion oder Closure
# Rückgabewert : keiner
# -----------------------------------------------------------------------------
# 0.0.1 - 22.01.2004 - CD - Erstellt
# -----------------------------------------------------------------------------
print "splash()\n" if $Conf{debug};
my $f = shift;
die "splash: Erwarte Parameter auf Funktion!" unless defined $f and
ref $f eq 'CODE';
#--------------------------------------------------------------------------
# Splash-Fenster erstellen:
#--------------------------------------------------------------------------
my $splash = new MainWindow(-background => 'blue',
-cursor => 'watch',
);
$splash->Label(-text => 'Programm',
-font => '{Arial} 150 {normal}',
-foreground => 'yellow',
-background => 'blue',
-cursor => 'watch',
)
->pack(-side => 'top',
-expand => 1,
-fill => 'both',
);
$splash->Label(-text => '... loading ...',
-anchor => 'n',
-foreground => 'yellow',
-background => 'blue',
-cursor => 'watch',
)
->pack(-side => 'bottom',
-expand => 0,
-fill => 'none',
);
# Größe des Fensters:
my $windowHeight = "600";
my $windowWidth = "800";
# Bildschirmgröße holen:
my $screenHeight = $splash->screenheight();
my $screenWidth = $splash->screenwidth();
# Splashscreen zentrieren:
$splash->geometry($windowWidth . 'x' . $windowHeight .
'+' . int($screenWidth/2 - $windowWidth/2) .
'+' . int($screenHeight/2 - $windowHeight/2)
);
# Größe festlegen:
$splash->minsize( $windowWidth, $windowHeight);
$splash->maxsize( $windowWidth, $windowHeight);
$splash->overrideredirect(1);
$splash->bind('<<toete>>' => sub { $splash->destroy() } );
$splash->after(100,
sub {
&$f();
$splash->eventGenerate('<<toete>>', -when => 'now');
}
);
MainLoop();
} # sub splash
10 entries, 1 page |