On 08/02/2008, Perl Rob [EMAIL PROTECTED] wrote:
Is Win32::GUI() capable of creating a marquee-style progress bar for
indicating activity instead of overall progress?
Yes, it's possible. It will only work on WinXP and later, as it
requires the (non-distributable) ComCtl32.dll V6 and above.
(1) You need perl to use a manifest to request to use the v6
ComCtl32.dll. The easiest way to do this is to drop a manifest file
into you perl bin/ directory (the diretory containing your perl.exe.
I'll attach the manifest file I use. It must be named
perl.exe.manifest (with the perl.exe part changed if you have a perl
executable by a different name)
(2) You need to add the PMS_MARQUEE style to the progress bar. See code below.
As an aside I notice that all the PBS_ and PBM_ constants are missing
from Win32::GUI::Constants - I'll add them for the next release.
Regards,
Rob.
#!perl -w
use strict;
use warnings;
use Win32::GUI 1.05 qw(CW_USEDEFAULT);
sub PBS_MARQUEE() {0x08}
my $mw = Win32::GUI::Window-new(
-title = 'WinXP Marquee Progress Bar',
-left = CW_USEDEFAULT,
-size = [200,150],
);
my $pb = $mw-AddProgressBar(
-pos = [10,10],
-size = [150,22],
-addstyle = PBS_MARQUEE,
);
$mw-AddTimer('T1', 300);
$mw-Show();
Win32::GUI::Dialog();
$mw-Hide();
exit(0);
sub T1_Timer {
$pb-StepIt();
}
__END__
perl.exe.manifest
Description: Binary data
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
http://perl-win32-gui.sourceforge.net/