You can subscribe to this list here.
2001 |
Jan
(226) |
Feb
(139) |
Mar
(156) |
Apr
(95) |
May
(181) |
Jun
(166) |
Jul
(80) |
Aug
(59) |
Sep
(69) |
Oct
(83) |
Nov
(142) |
Dec
(33) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(42) |
Feb
(91) |
Mar
(76) |
Apr
(113) |
May
(67) |
Jun
(68) |
Jul
(37) |
Aug
(41) |
Sep
(16) |
Oct
(135) |
Nov
(51) |
Dec
(21) |
2003 |
Jan
(37) |
Feb
(36) |
Mar
(37) |
Apr
(103) |
May
(68) |
Jun
(70) |
Jul
(77) |
Aug
(12) |
Sep
(9) |
Oct
(53) |
Nov
(88) |
Dec
(63) |
2004 |
Jan
(263) |
Feb
(106) |
Mar
(36) |
Apr
(21) |
May
(21) |
Jun
(34) |
Jul
(33) |
Aug
(34) |
Sep
(35) |
Oct
(21) |
Nov
(43) |
Dec
(63) |
2005 |
Jan
(28) |
Feb
(42) |
Mar
(29) |
Apr
(14) |
May
(41) |
Jun
(20) |
Jul
(65) |
Aug
(136) |
Sep
(41) |
Oct
(74) |
Nov
(34) |
Dec
(94) |
2006 |
Jan
(85) |
Feb
(94) |
Mar
(68) |
Apr
(103) |
May
(66) |
Jun
(51) |
Jul
(24) |
Aug
(56) |
Sep
(57) |
Oct
(85) |
Nov
(73) |
Dec
(68) |
2007 |
Jan
(59) |
Feb
(32) |
Mar
(13) |
Apr
(32) |
May
(36) |
Jun
(36) |
Jul
(64) |
Aug
(35) |
Sep
(19) |
Oct
(10) |
Nov
(13) |
Dec
(20) |
2008 |
Jan
(26) |
Feb
(41) |
Mar
(19) |
Apr
(24) |
May
(16) |
Jun
(33) |
Jul
(34) |
Aug
(4) |
Sep
(11) |
Oct
|
Nov
(26) |
Dec
(23) |
2009 |
Jan
(5) |
Feb
(2) |
Mar
(21) |
Apr
(16) |
May
(13) |
Jun
(6) |
Jul
(34) |
Aug
(2) |
Sep
(1) |
Oct
(7) |
Nov
(5) |
Dec
(24) |
2010 |
Jan
(3) |
Feb
(5) |
Mar
(6) |
Apr
(6) |
May
(14) |
Jun
(6) |
Jul
(1) |
Aug
(12) |
Sep
(10) |
Oct
(9) |
Nov
|
Dec
(2) |
2011 |
Jan
(4) |
Feb
(5) |
Mar
(30) |
Apr
(1) |
May
(2) |
Jun
(5) |
Jul
(3) |
Aug
(2) |
Sep
(3) |
Oct
|
Nov
(6) |
Dec
|
2012 |
Jan
|
Feb
(10) |
Mar
|
Apr
|
May
(1) |
Jun
(3) |
Jul
(1) |
Aug
|
Sep
(2) |
Oct
|
Nov
(2) |
Dec
(4) |
2013 |
Jan
(5) |
Feb
(3) |
Mar
|
Apr
(3) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
(2) |
Feb
|
Mar
|
Apr
(1) |
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(9) |
Nov
(7) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(5) |
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Craig N. <sas...@gm...> - 2008-07-01 12:47:09
|
Hi, I'm having some trouble with getting an idea I have (that I think will work) actually implemented in Perl. I work at a job that has me connecting to various systems all over the place with the command prompt (Win32 environment). I also have a rather large collection of scripts, batch files, and commands that I use frequently on the systems I connect to. What I'm trying to do is to reduce some of the repetitive tasks while working on these systems. I want to have a command prompt that basically has a toolbar of sorts associated with it, which will have buttons for my most used scripts/commands/etc, so that when I click on a button the information is either pasted to the window, or the script launches in the background on the appropriate system. I have tried researching this online via Google without much luck. (Searching for things like wrapping command prompt, etc.) I already have a Perl script that makes my connections for me, which I run from a regular command prompt, and then the connection script backticks out the remote console application. So I am either looking to add the functionality to that script, or if I could get a command prompt wrapped into a Perl window, I could add the connection script to it Any suggestions or pointers of where I can look for more information? Thanks! - Craig |
From: marko m. <mla...@gm...> - 2008-06-29 17:22:56
|
I just started to use Win32::GUI, it´s better than Tk, but i have a problem. How to print selection from combobox? |
From: rpnoble <rp...@ib...> - 2008-06-23 05:45:56
|
Win32::GUI Community, Thank you for your help in the birth of this sample application. Thanks to Brian Millham for the MUTEX suggestion and sample code. Also to jez for the Hook suggestion. To Robert May, Thanks for such a good perl module. I have posted this sampe so others won't have the same growing pains that I did. I hope you can use it. The purpose of this application is to scan barcodes using the Socket Mobile ScanAPI.dll. You must have the Socket Mobile SDK installed before this application will run. The application has two buttons. The first "START" will initilize the ScanAPI.dll. The second button "Scan" will trigger the scanner and print out the result. Based on the SocketScan.exe, it will also trigger the scanner by starting a second copy of the application. This is useful when you use a Hot button on a laptop to start the application and trigger the scanner. Please feel free to suggest improvements. Richard Noble ___ Code ___ #!perl -w use strict; use warnings; use Win32::GUI qw(MB_OK MB_ICONASTERISK); use Win32::API; use Win32::API::Prototype; use Carp qw(croak); use Win32::Mutex; # Preloaded methods go here. ########################################################################### # DLL Function call setup ########################################################################### my $ScanInit = Win32::API->new('ScanAPI.dll','long ScanInit(HWND hWnd, long wminseriton, long wmRemoval)'); my $ScanOpenDevice = Win32::API->new('ScanAPI.dll','long ScanOpenDevice(HANDLE hScanner)'); my $ScanCloseDevice = Win32::API->new('ScanAPI.dll','long ScanCloseDevice(HANDLE hScanner)'); my $ScanRequestDataEvents = Win32::API->new('ScanAPI.dll','long ScanRequestDataEvents(HANDLE hScanner, HWND hWnd, long wmScannerData)'); my $ScanTrigger = Win32::API->new('ScanAPI.dll','long ScanTrigger(HANDLE hScanner)'); my $ScanGetData = Win32::API->new('ScanAPI.dll','long ScanGetData(HANDLE hScanner, LPSTR lpBuff, LPINT BufSize)'); # define user messages sub WM_USER() {1024}; sub WM_INSERTION(){WM_USER + 1}; # the message we want on device insertions sub WM_REMOVAL(){WM_USER + 2}; # the message we want on device removals sub WM_SCANNERDATA(){WM_USER + 3}; # the message we want when data is available sub WM_CHS_STATUS(){WM_USER + 4}; # the message we want when CHS status changes sub WM_SCANBADGE(){WM_USER + 5}; # the message we want when application starts a 2nd copy to scan a badge sub NOCALLBACK(){1}; # SCANAPI return values use constant SR_SUCCESS => 0; use constant SR_INVALID_WMINSERTION => 1; use constant SR_INVALID_WMREMOVAL => 2; use constant SR_PLUG_THREAD_FAILURE => 3; use constant SR_DEVICE_THREAD_FAILURE => 4; use constant SR_INVALID_SCANNER_HANDLE => 5; use constant SR_OPEN_FAILURE => 6; use constant SR_INVALID_WMSCANNERDATA => 7; use constant SR_NO_DATA => 8; use constant SR_BUFFER_TOO_SMALL => 9; use constant SR_SCANNER_NOT_OPEN => 10; use constant SR_INVALID_SOUND_TYPE => 11; use constant SR_WAVFILE_NOT_FOUND => 12; use constant SR_MEMORY_FAILURE => 13; use constant SR_INVALID_ERR => 14; use constant SR_TOO_MANY_USERS => 15; use constant SR_NOT_INITIALIZED => 16; use constant SR_DEVICE_FAILURE => 17; use constant SR_INTERNAL_FAILURE => 18; use constant SR_INVALID_STRUCTURE => 19; use constant SR_HOTSWAP_ERROR => 20; use constant SR_SCANNER_REMOVED => 21; use constant SR_INVALID_WMCHSSTATUS => 22; our $ret; our $ScannerHandle; sub Buffersize(){1024}; # Create or open the mutex # This code checks to see if a copy of the application is running. # If it detects the first copy it sends it a message to trigger the # scanner. Then exit after the message has been posted. my $mutex = Win32::Mutex->new(1, "Mutex Test"); # Die if the mutex exists (183 == ERROR_ALREADY_EXISTS) if ($^E == 183) { # find first copy of application and get its window handle my $hWnd=Win32::GUI::FindWindow("\x00","ScanTest"); Win32::GUI::SendMessage($hWnd, WM_SCANBADGE, 1, 0); exit; } # Create a window, saving it in variable $main my $main = Win32::GUI::Window->new( -name => 'Main', -width => 100, -height => 100, -title => 'ScanTest', ); # Add a label to the window (by default a label # has size big enough for its text and is positioned # in the top left of its containing window) $main->AddLabel( -text => $main->{-handle}, ); $main->AddButton( -name => 'button1', -text => "Start", ); $main->AddButton( -name => 'button2', -text => "Scan", -left => 50, ); # set up message hooks $main->Hook(WM_INSERTION, \&WMINSERTION); $main->Hook(WM_REMOVAL, \&WMREMOVAL); $main->Hook(WM_SCANNERDATA, \&WMSCANNERDATA); $main->Hook(WM_SCANBADGE, \&WMSCANBADGE); # Show our main window $main->Show(); # Enter the windows message loop, often referred # to as the "dialog phase". Win32::GUI::Dialog(); # When the message loop returns control to our # perl program, then the interaction with the # GUI is complete, so we exit. exit(0); ###################### ###################### # The Terminate event handler for a window # named 'Main'. Returning -1 causes the # windows message loop to exit and return # control to our perl program. sub Main_Terminate { return -1; } sub button1_Click { # initilize the ScanAPI.dll $ret=$ScanInit->Call($main->{-handle},WM_INSERTION,WM_REMOVAL); if ($ret != SR_SUCCESS) { &DisplayScanError($ret); return 0; } } 1; sub button2_Click { # trigger the scanner $ret=$ScanTrigger->Call($ScannerHandle); if ($ret != SR_SUCCESS) { &DisplayScanError($ret); return 0; } } 1; sub WMINSERTION { # Handle the scanner insertion message # get data passed from the message queue my ($object, $wParam, $lParam, $type, $msgcode) = @_; return unless $type == 0; return unless $msgcode == WM_INSERTION; # Store the scanner handle to a global $ScannerHandle=$lParam; # call the ScanAPI open device function my $ret=$ScanOpenDevice->Call($lParam); if ($ret != SR_SUCCESS) { &DisplayScanError($ret); return 0; } # if the ScanAPI opens the scanner, add this application to the ScanAPI.dll message queue $ret=$ScanRequestDataEvents->Call($lParam, $main->{-handle}, WM_SCANNERDATA); if ($ret != SR_SUCCESS) { &DisplayScanError($ret); return 0; } return 1; } sub WMREMOVAL { # Handle the scanner removal message # get data passed from the message queue my ($object, $wParam, $lParam, $type, $msgcode) = @_; return unless $type == 0; return unless $msgcode == WM_REMOVAL; # Close the ScanAPI my $ret=$ScanCloseDevice->Call($lParam); if ($ret != SR_SUCCESS) { &DisplayScanError($ret); return 0; } return 1; } sub WMSCANNERDATA { # Handle the scanner has data waiting message # get data passed from the message queue my ($object, $wParam, $lParam, $type, $msgcode) = @_; return unless $type == 0; return unless $msgcode == WM_SCANNERDATA; # The $wParam tell us how much data is in the scanner buffer. If there is # a problem in future, multiply the $wParam by the Win32::API::Type->sizeof() # function using the TCHAR # define a buffer the size of the data in the scanner buffer my $buffer= 0 x $wParam; my $buffersize= \$wParam; # store the reference to $wmParam, why I don't know. # Get the data from the scanner my $ret=$ScanGetData->Call($ScannerHandle, $buffer, $buffersize); if ($ret != SR_SUCCESS) { &DisplayScanError($ret); return 0; } #Process scanner data here print $buffer."\n\n"; return 1; } sub WMSCANBADGE { # This message tells the application to trigger the scanner. This message is sent # from a 2nd copy of the application # get data passed from the message queue print "a second copy of the program has started\n"; my ($object, $wParam, $lParam, $type, $msgcode) = @_; return unless $type == 0; return unless $msgcode == WM_SCANBADGE; #`trigger the scanner button2_Click(); return 1; } sub DisplayScanError() { # process any ScanAPI error messages my $ErrorCode=$_[0]; my $ErrorText=''; if ($ErrorCode == SR_INVALID_WMINSERTION) { $ErrorText= "ScanAPI Error: Invalid WM_INSERTION Value"; } if ($ErrorCode == SR_INVALID_WMREMOVAL) { $ErrorText= "ScanAPI Error: Invalid WM_REMOVAL Value"; } if ($ErrorCode == SR_PLUG_THREAD_FAILURE) { $ErrorText= "ScanAPI Error: SR_PLUG_THREAD_FAILURE"; } if ($ErrorCode == SR_DEVICE_THREAD_FAILURE) { $ErrorText= "ScanAPI Error: SR_DEVICE_THREAD_FAILURE"; } if ($ErrorCode == SR_INVALID_SCANNER_HANDLE) { $ErrorText= "ScanAPI Error: SR_INVALID_SCANNER_HANDLE"; } if ($ErrorCode == SR_OPEN_FAILURE) { $ErrorText= "ScanAPI Error: SR_OPEN_FAILURE"; } if ($ErrorCode == SR_INVALID_WMSCANNERDATA) { $ErrorText= "ScanAPI Error: SR_INVALID_WMSCANNERDATA"; } if ($ErrorCode == SR_NO_DATA) { $ErrorText= "ScanAPI Error: SR_NO_DATA"; } if ($ErrorCode == SR_BUFFER_TOO_SMALL) { $ErrorText= "ScanAPI Error: SR_BUFFER_TOO_SMALL"; } if ($ErrorCode == SR_SCANNER_NOT_OPEN) { $ErrorText= "ScanAPI Error: SR_SCANNER_NOT_OPEN"; } if ($ErrorCode == SR_INVALID_SOUND_TYPE) { $ErrorText= "ScanAPI Error: SR_INVALID_SOUND_TYPE"; } if ($ErrorCode == SR_WAVFILE_NOT_FOUND) { $ErrorText= "ScanAPI Error: SR_WAVFILE_NOT_FOUND"; } if ($ErrorCode == SR_MEMORY_FAILURE) { $ErrorText= "ScanAPI Error: SR_MEMORY_FAILURE"; } if ($ErrorCode == SR_INVALID_ERR) { $ErrorText= "ScanAPI Error: SR_INVALID_ERR"; } if ($ErrorCode == SR_TOO_MANY_USERS) { $ErrorText= "ScanAPI Error: SR_TOO_MANY_USERS"; } if ($ErrorCode == SR_NOT_INITIALIZED) { $ErrorText= "ScanAPI Error: SR_NOT_INITIALIZED"; } if ($ErrorCode == SR_DEVICE_FAILURE) { $ErrorText= "ScanAPI Error: SR_DEVICE_FAILURE"; } if ($ErrorCode == SR_INTERNAL_FAILURE) { $ErrorText= "ScanAPI Error: SR_INTERNAL_FAILURE"; } if ($ErrorCode == SR_INVALID_STRUCTURE) { $ErrorText= "ScanAPI Error: SR_INVALID_STRUCTURE"; } if ($ErrorCode == SR_HOTSWAP_ERROR) { $ErrorText= "ScanAPI Error: SR_HOTSWAP_ERROR"; } if ($ErrorCode == SR_SCANNER_REMOVED) { $ErrorText= "ScanAPI Error: SR_SCANNER_REMOVED"; } if ($ErrorCode == SR_INVALID_WMCHSSTATUS) { $ErrorText= "ScanAPI Error: SR_INVALID_WMCHSSTATUS"; } Win32::GUI::MessageBox( $main, "ScanAPI.dll Error Message: $ErrorText", MB_OK|MB_ICONASTERISK ); return 0; } ___ End Code ___ -- View this message in context: http://www.nabble.com/Sample-application-to-access-the-ScanAPI.dll-from-Socket-Mobile-tp18062929p18062929.html Sent from the perl-win32-gui-users mailing list archive at Nabble.com. |
From: zak <cho...@gm...> - 2008-06-22 07:26:06
|
hi i have discovered a two valuable "secret" tutorials by "Robert May" : Drawing (Part 1): http://www.mail-archive.com/per...@li.../msg05194.html Drawing (Part 2) : http://www.mail-archive.com/per...@li.../msg05195.html found also on sourceforge.net site. this is another response to the previous "rpnoble" question with a title: Taking action after the call to Win32::GUI::Dialog() i will refer to the tutorial Drawing (Part 2): it contains an example about how to draw something on a click of a button, and how to refresh the screen by copying the screen to memory then from memory to screen in the refresh event if required, the example are fully documented, i wish it is encluded in the examples with the win32gui package with a name such as DrawOnClick.pl below i will copy the codes from that example with a small variations to launch a windows with a green color, then when we click a button it will draw a sine wave function and a blue rectangle, there is also a cls button. the draw will not be erased when we cover the window with another window. the dimensions are for 640x480 screen . use Win32::GUI; use warnings; use strict; use Win32::GUI qw( CW_USEDEFAULT RDW_VALIDATE RDW_NOCHILDREN COLOR_3DFACE ); # The size of the memory DC we will create to draw into my ($WIDTH, $HEIGHT) = (640, 480); my $mw = Win32::GUI::Window->new( -title => 'Draw on click example', -left => CW_USEDEFAULT, -size => [ 640, 480 ], -onPaint => \&paint, ); $mw->AddButton( -name => "Button1", -text => "RUN ", -pos => [ 0, 0 ], -onClick => \&click, ); $mw->AddButton( -name => "Button2", -text => "CLS ", -pos => [ 0, 30 ], ); # Create a memory DC to act as a buffer into which we'll # do our drawing; then in the paint handler we'll just bitblt() # from the memory DC to the screen. my $memDC; my $mem_bitmap; { my $dc = $mw->GetDC(); $memDC = $dc->CreateCompatibleDC(); $mem_bitmap = $dc->CreateCompatibleBitmap($WIDTH, $HEIGHT); } my $memDC_orig_state = $memDC->Save(); $memDC->SelectObject($mem_bitmap); # Draw into the memory DC FormLoadColor($memDC); # to paint the windows with green color $mw->Show(); Win32::GUI::Dialog(); # Tidy up $memDC->Restore($memDC_orig_state); Win32::GUI::DC::DeleteObject($mem_bitmap); Win32::GUI::DC::DeleteDC($memDC); exit(0); sub paint { my ($self, $dc) = @_; my $saved = $dc->Save(); { my($l, $t, $r, $b) = $dc->GetUpdateRect(1); if(defined $l) { my $clip_rgn = Win32::GUI::Region->CreateRectRgn($l, $t, $r, $b); $dc->SelectClipRgn($clip_rgn); } # Validate the whole window $self->Redraw(RDW_VALIDATE | RDW_NOCHILDREN); } $dc->BitBlt(0,0,$WIDTH,$HEIGHT, $memDC, 0,0); $dc->Restore(); return 1; } sub click { my ($self) = @_; MyDraw($memDC); $self->GetParent->InvalidateRect(1); return 1; } sub MyDraw { my ($dc) = @_; # Erase the background - COLOR_3DFACE is the window # background color my @colrB = "210,251,125"; #color of background my @colrBR= map { split ',', $_ } @colrB; $dc->FillRect( 0,0,$WIDTH,$HEIGHT, #Win32::GUI::Brush->new( -system => COLOR_3DFACE ) ); Win32::GUI::Brush->new( [@colrBR]) ); # Do our (complex) drawing @colrB = "98,89,249"; #color of rectangle my $x=0; my $y=250; @colrBR= map { split ',', $_ } @colrB; my $P = new Win32::GUI::Pen( -color => [ @colrBR], -width => 1, ); my $B = new Win32::GUI::Brush( [@colrBR] ); my $oldP = $dc->SelectObject($P); my $oldB = $dc->SelectObject($B); $dc->Rectangle(70, 60, 300, 200); my @colrF = "245, 56, 10"; #color of the Plot my $pointsize = "1"; my @colrFR= map { split ',', $_ } @colrF; my $pi = 3.1415926; for ($x = -(4*$pi); $x <= +(4*$pi); $x += 0.1) { $P = new Win32::GUI::Pen( -color => [ @colrFR], -width => 1, ); $B = new Win32::GUI::Brush( [ @colrFR] ); $oldP = $dc->SelectObject($P); $oldB = $dc->SelectObject($B); $y = sin($x); my $x1 = $x*20 + 250; $y = $y*30 + 250; $dc->Circle($x1, $y,$pointsize); } return; } sub FormLoadColor { my ($dc) = @_; # Erase the background - COLOR_3DFACE is the window # background color my @colrB = "210,251,125"; #color of background my @colrBR= map { split ',', $_ } @colrB; $dc->FillRect( 0,0,$WIDTH,$HEIGHT, #Win32::GUI::Brush->new( -system => COLOR_3DFACE ) ); Win32::GUI::Brush->new( [@colrBR]) ); } sub Button2_Click { my $dc = $mw->GetDC; # Erase the background - COLOR_3DFACE is the window # background color $dc->FillRect( 0,50,$WIDTH,$HEIGHT, Win32::GUI::Brush->new( -system => COLOR_3DFACE ) ); } __END__ |
From: Octavian R. <ora...@gm...> - 2008-06-19 18:02:56
|
Thread safe or not, unlike a Win32::GUI object, a $dbh object can't be shared among more threads. Does anyone know why? Because of DBI, of DBD::mysql, or because a database connection can't be shared among more threads, or something else? Octavian ----- Original Message ----- From: "Charles Alderman" <cha...@al...> To: <per...@li...> Sent: Thursday, June 19, 2008 6:42 PM Subject: Re: [perl-win32-gui-users] Avoid the appearance of a "frozen" > To clarify my earlier comment: DBI is considered threadsafe but some > of the DBD's are not. > > Here's more info: > > http://search.cpan.org/~timb/DBI/DBI.pm#Threads_and_Thread_Safety > > As far determining which modules are or are not threadsafe, read the > perldocs! > > Thanks, > Charles Alderman > > ----- Original Message ----- > From: Perl Rob <pe...@co...> > Sent: Thu, 19 Jun 2008 08:52:30 -0600 > Re: Re: [perl-win32-gui-users] Avoid the appearance of a "frozen" > > > >> Thanks for all the great responses! I changed my code so that each GUI >> handle is managed only by the thread that created it. This works >> perfect--and has eliminated all the crasing I was seeing! >> >> As a follow-up question, how do you know *for sure* which modules are not >> thread-safe? For example, I wouldn't have guessed that DBI isn't thread >> safe. >> >> Thanks again, >> Rob >> >> >> ------------------------------------------------------------------------- >> Check out the new SourceForge.net Marketplace. >> It's the best place to buy or sell services for >> just about anything Open Source. >> http://sourceforge.net/services/buy/index.php >> _______________________________________________ >> Perl-Win32-GUI-Users mailing list >> Per...@li... >> https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users >> http://perl-win32-gui.sourceforge.net/ >> > > > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > http://perl-win32-gui.sourceforge.net/ |
From: Charles A. <cha...@al...> - 2008-06-19 15:42:43
|
To clarify my earlier comment: DBI is considered threadsafe but some of the DBD's are not. Here's more info: http://search.cpan.org/~timb/DBI/DBI.pm#Threads_and_Thread_Safety As far determining which modules are or are not threadsafe, read the perldocs! Thanks, Charles Alderman ----- Original Message ----- From: Perl Rob <pe...@co...> Sent: Thu, 19 Jun 2008 08:52:30 -0600 Re: Re: [perl-win32-gui-users] Avoid the appearance of a "frozen" > Thanks for all the great responses! I changed my code so that each GUI > handle is managed only by the thread that created it. This works > perfect--and has eliminated all the crasing I was seeing! > > As a follow-up question, how do you know *for sure* which modules are not > thread-safe? For example, I wouldn't have guessed that DBI isn't thread > safe. > > Thanks again, > Rob > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > http://perl-win32-gui.sourceforge.net/ > |
From: Perl R. <pe...@co...> - 2008-06-19 14:52:34
|
Thanks for all the great responses! I changed my code so that each GUI handle is managed only by the thread that created it. This works perfect--and has eliminated all the crasing I was seeing! As a follow-up question, how do you know *for sure* which modules are not thread-safe? For example, I wouldn't have guessed that DBI isn't thread safe. Thanks again, Rob |
From: Jeremy W. <jez...@ho...> - 2008-06-18 21:09:49
|
> On Wed, 18 Jun 2008, Charles Alderman wrote: > > I've had some luck doing this using fork() and a pipe to communicate > > between the (pseudo) processes. On Win32, fork is emulated using perl > > threads. So it's basically the same thing. I haven't tested this on > > Perl 5.10 yet, but I've had a gui application built this way running > > and in use for more than 18 months now. > > > > Create and layout the window before spawning a new process/thread, as > > both pseudo processes can use the same gui handles. > > You are not really supposed to use GUI handles from a thread that doesn't > own them (the one that has created them). While "read" access is generally > safe, modifying GUI objects from non-owning threads isn't. For example: > > http://blogs.msdn.com/oldnewthing/archive/2005/10/10/479124.aspx Just to add that you can also spawn multiple threads, each creating their own Win32::GUI windows (with their own message queues) allowing each thread to have each an "instance" of the application. It might sound clunky, but it does scale well on dual/quad cores. Cheers, jez. _________________________________________________________________ http://clk.atdmt.com/UKM/go/msnnkmgl0010000007ukm/direct/01/ |
From: Charles A. <cha...@al...> - 2008-06-18 18:44:39
|
----- Original Message ----- From: Jan Dubois <ja...@ac...> Sent: Wed, 18 Jun 2008 10:58:28 -0700 Re: RE: [perl-win32-gui-users] Avoid the appearance of a "frozen" window > You are not really supposed to use GUI handles from a thread that doesn't > own them (the one that has created them). While "read" access is generally > safe, modifying GUI objects from non-owning threads isn't. For example: > > http://blogs.msdn.com/oldnewthing/archive/2005/10/10/479124.aspx > > Cheers, > -Jan > > Sure, race conditions and IPC are always issues to consider in multi-threaded applications. But, I don't think there is anything inherently flawed with pre-spawning off threads as event handlers for the various gui elements on a window. Just build the app to not make changes to the window in those threads. In fact, I feel like that's a preferred approach to spawning off a new thread after the main thread handles window events. Pre spawning/forking/whatever shifts a lot of overhead to the application initial load time, which leads to a better user experience. Users hate waiting after clicking. All of this kind of feels like a hack to me (I know all of these problems have been solved a bajillion times before), but I don't consider myself a great GUI programmer. I picked Win32::GUI because it gave me an easy on-ramp to building a "professional" looking windows gui application. And this was the quickest, best way for me to get my code out the door... :) Thanks, Charles Alderman |
From: Jan D. <ja...@ac...> - 2008-06-18 17:58:27
|
On Wed, 18 Jun 2008, Charles Alderman wrote: > I've had some luck doing this using fork() and a pipe to communicate > between the (pseudo) processes. On Win32, fork is emulated using perl > threads. So it's basically the same thing. I haven't tested this on > Perl 5.10 yet, but I've had a gui application built this way running > and in use for more than 18 months now. > > Create and layout the window before spawning a new process/thread, as > both pseudo processes can use the same gui handles. You are not really supposed to use GUI handles from a thread that doesn't own them (the one that has created them). While "read" access is generally safe, modifying GUI objects from non-owning threads isn't. For example: http://blogs.msdn.com/oldnewthing/archive/2005/10/10/479124.aspx Cheers, -Jan |
From: zak <cho...@gm...> - 2008-06-18 16:04:10
|
hello i refer to the "rpnoble" question: ((((In the Draw.pl example, all program action takes place in the timer event. Is there a way to trigger a default program action without using the timer event once the program has called Win32::GUI::Dialog()? In all of my win32::GUI programs, I use a menu or button to start action. )))))) here is a not optimized code which display a black rectangle and a red line whith thickness "2" upon a click on a button , and erase the draw upon the click of another button, i have cut the code from a very long file . the only problem with the draw is that it is erased when we cover it whith another window. use Win32::GUI; my $mw = new Win32::GUI::Window( -left => 0, -top => 0, -width => 638, -height => 478, -name => "mw", ); $mw->AddButton( -name => "Button1", -text => "RUN ", -pos => [ 0, 0 ], ); $mw->AddButton( -name => "Button2", -text => "CLS ", -pos => [ 0, 30 ], ); $mw->Show(); Win32::GUI::Dialog(); sub Window_Terminate { return -1; } sub Button1_Click { my $DC = $mw->GetDC; my @colrB = "0,0,0"; #color of background $x=0; $y=0; @colrBR= map { split ',', $_ } @colrB; $P = new Win32::GUI::Pen( -color => [ @colrBR], -width => 1, ); $B = new Win32::GUI::Brush( [@colrBR] ); $oldP = $DC->SelectObject($P); $oldB = $DC->SelectObject($B); $DC->Rectangle(70, 45, 300, 200); my @colrF = "245, 56, 10"; #color of Foreground $pointsize = "2"; @colrFR= map { split ',', $_ } @colrF; for (my $i= 1; $i <= 400; $i += 1) { $P = new Win32::GUI::Pen( -color => [ @colrFR], -width => 1, ); $B = new Win32::GUI::Brush( [ @colrFR] ); $oldP = $DC->SelectObject($P); $oldB = $DC->SelectObject($B); $x+=1; $y+=1; $DC->Circle($x, $y,$pointsize); } } sub Button2_Click { $mw -> InvalidateRect(1); } |
From: Charles A. <cha...@al...> - 2008-06-18 15:31:51
|
I've had some luck doing this using fork() and a pipe to communicate between the (pseudo) processes. On Win32, fork is emulated using perl threads. So it's basically the same thing. I haven't tested this on Perl 5.10 yet, but I've had a gui application built this way running and in use for more than 18 months now. Create and layout the window before spawning a new process/thread, as both pseudo processes can use the same gui handles. After the thread/fork instantiate the non threadsafe modules. (Like opening a DBI connection). Thanks, Charles Alderman ----- Original Message ----- From: Jeremy White <jez...@ho...> Sent: Wed, 18 Jun 2008 14:58:46 +0000 Re: Re: [perl-win32-gui-users] Avoid the appearance of a "frozen" window > > Hi, > > If you are doing the processing in a loop, you can call DoEvents > which will unfreeze the window and process all events currently in > the queue. This approach would only work if the call to DoEvents > happens frequently enough while you are processing. The alternative > approach is to use threads. As long as you are using a modern perl > (ie, 5.8.7+) and the latest version of Win32::GUI you should have no > problems with threads. > > Cheers, > > jez. > > ________________________________ > From: pe...@co... > To: per...@li... > Date: Tue, 17 Jun 2008 21:38:50 -0600 > Subject: [perl-win32-gui-users] Avoid the appearance of a "frozen" window > > > Hi > all, > > I’m > curious: how do you prevent your window from looking like it’s frozen > during lengthy operations? For example, suppose a user clicks a button that > will trigger a very long event, such as copying a 10 GB file. While > the really > long event is underway, how do you free up your window so that it doesn’t > appear unresponsive? I usually resort to writing two separate > programs--the GUI > and a “worker”--and I just launch the worker when needed. > > > > > > > > I > realize threads are an option, but in my experience they are not always > reliable (many Win32::GUI modules don’t seem to be thread-safe). > > > > > > > > Thanks, > > > > Rob > > > > > > > > > _________________________________________________________________ > > http://clk.atdmt.com/UKM/go/msnnkmgl0010000007ukm/direct/01/ > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > http://perl-win32-gui.sourceforge.net/ > |
From: Jeremy W. <jez...@ho...> - 2008-06-18 14:58:43
|
Hi, If you are doing the processing in a loop, you can call DoEvents which will unfreeze the window and process all events currently in the queue. This approach would only work if the call to DoEvents happens frequently enough while you are processing. The alternative approach is to use threads. As long as you are using a modern perl (ie, 5.8.7+) and the latest version of Win32::GUI you should have no problems with threads. Cheers, jez. ________________________________ From: pe...@co... To: per...@li... Date: Tue, 17 Jun 2008 21:38:50 -0600 Subject: [perl-win32-gui-users] Avoid the appearance of a "frozen" window Hi all, I’m curious: how do you prevent your window from looking like it’s frozen during lengthy operations? For example, suppose a user clicks a button that will trigger a very long event, such as copying a 10 GB file. While the really long event is underway, how do you free up your window so that it doesn’t appear unresponsive? I usually resort to writing two separate programs--the GUI and a “worker”--and I just launch the worker when needed. I realize threads are an option, but in my experience they are not always reliable (many Win32::GUI modules don’t seem to be thread-safe). Thanks, Rob _________________________________________________________________ http://clk.atdmt.com/UKM/go/msnnkmgl0010000007ukm/direct/01/ |
From: Perl R. <pe...@co...> - 2008-06-18 03:38:49
|
Hi all, I'm curious: how do you prevent your window from looking like it's frozen during lengthy operations? For example, suppose a user clicks a button that will trigger a very long event, such as copying a 10 GB file. While the really long event is underway, how do you free up your window so that it doesn't appear unresponsive? I usually resort to writing two separate programs--the GUI and a "worker"--and I just launch the worker when needed. I realize threads are an option, but in my experience they are not always reliable (many Win32::GUI modules don't seem to be thread-safe). Thanks, Rob |
From: rpnoble <rp...@ib...> - 2008-06-17 19:31:53
|
In the Draw.pl example, all program action takes place in the timer event. Is there a way to trigger a default program action without using the timer event once the program has called Win32::GUI::Dialog()? In all of my win32::GUI programs, I use a menu or button to start action. -- View this message in context: http://www.nabble.com/Taking-action-after-the-call-to-Win32%3A%3AGUI%3A%3ADialog%28%29--tp17935568p17935568.html Sent from the perl-win32-gui-users mailing list archive at Nabble.com. |
From: Perl R. <pe...@co...> - 2008-06-17 04:49:55
|
Hi all, Does anyone know how to use the -fill and -frame options with the AddLabel() method? Do they even work? I can't tell from the documentation whether I should specify multiple colors or just one, or whether I'm limited to the colors listed. I've tried every combination I can think of, and I'm getting nowhere. I can get -frame => "etched" to work, but then the text from my -text option disappears (so really, I can't get it working). I feel like I must be missing something obvious and simple. How hard could this really be? Here's the documentation: -fill => black/gray/white/none (default none) Fills the control rectangle ("black", "gray" and "white" are the window frame color, the desktop color and the window background color respectively). -frame => black/gray/white/etched/none (default none) Draws a border around the control. colors are the same of -fill, with the addition of "etched" (a raised border). Thanks, Rob |
From: Brian M. <bmi...@hu...> - 2008-06-15 14:12:28
|
rpnoble wrote: > How can i detect a 2nd launch of my application, popup an error message and > then exit? > Here's a sample of how to use a mutex. A mutex is better than Ilyn's example if your wondows title may change (if you change the title to show the currently open document, status, etc.) use strict; use warnings; use Win32::Mutex; # Create or open the mutex my $mutex = Win32::Mutex->new(1, "Mutex Test"); # Die if the mutex exists (183 == ERROR_ALREADY_EXISTS) die "App is already running" if $^E == 183; # Do something here print "Sleeping...\n"; sleep(30); # We're done, release the mutex $mutex->release; -- Brian, Tommy, Helen and Paka -- bmi...@hu... This message traveled at least 44,000 miles to reach you! --- avast! Antivirus: Outbound message clean. Virus Database (VPS): 080615-0, 06/15/2008 Tested on: 6/15/2008 10:10:48 AM avast! is copyright (c) 2000-2008 ALWIL Software. http://www.avast.com |
From: rpnoble <rp...@ib...> - 2008-06-14 13:39:20
|
Thanks for the reply Brian. I think I'll try Ilya's method first. Brian Millham-2 wrote: > > rpnoble wrote: >> How can i detect a 2nd launch of my application, popup an error message >> and >> then exit? >> > Look at the Win32::Mutex module. You register your app when it starts, > and check if it's already running. > > If you need, I can give you some sample code. > > -- > Brian, Tommy, Helen and Paka -- bmi...@hu... > This message traveled at least 44,000 miles to reach you! > > > > --- > avast! Antivirus: Outbound message clean. > Virus Database (VPS): 080613-1, 06/13/2008 > Tested on: 6/13/2008 9:46:47 PM > avast! is copyright (c) 2000-2008 ALWIL Software. > http://www.avast.com > > > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > http://perl-win32-gui.sourceforge.net/ > > -- View this message in context: http://www.nabble.com/detecting-a-second-version-of-my-app-tp17833771p17839562.html Sent from the perl-win32-gui-users mailing list archive at Nabble.com. |
From: rpnoble <rp...@ib...> - 2008-06-14 13:37:47
|
Thanks Ilya; I did not even think of that. I give it a try later today. Ilya BANDORIN wrote: > > If your running application has at least one window which is defined on > startup and never gets destroyed, you can do a simple check. The example > below assumes that your window has title "BLAH-BLAH-BLAH": > > my $CheckAlreadyRun = Win32::GUI::FindWindow('', 'BLAH-BLAH-BLAH'); > if ($CheckAlreadyRun) { > Win32::GUI::Show($CheckAlreadyRun); > Win32::GUI::SetForegroundWindow($CheckAlreadyRun); > exit; > } > > In my example it just shows the window which is already exists. But you > can do and error popup or whatever. > > > > Regards, > _____ > Ilya Bandorin > > -----Original Message----- > From: per...@li... > [mailto:per...@li...] On Behalf Of > rpnoble > Sent: Saturday, June 14, 2008 3:30 AM > To: per...@li... > Subject: [perl-win32-gui-users] detecting a second version of my app > > > How can i detect a 2nd launch of my application, popup an error message > and > then exit? > -- > View this message in context: > http://www.nabble.com/detecting-a-second-version-of-my-app-tp17833771p17 > 833771.html > Sent from the perl-win32-gui-users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------ > - > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > http://perl-win32-gui.sourceforge.net/ > > ========================================================= > > Ce message et toutes les pieces jointes (ci-apres le "message") > sont confidentiels et susceptibles de contenir des informations > couvertes par le secret professionnel. Ce message est etabli > a l'intention exclusive de ses destinataires. Toute utilisation > ou diffusion non autorisee interdite. > Tout message eletronique est susceptible d'alteration. La SOCIETE GENERALE > et ses filiales declinent toute responsabilite au titre de ce message > s'il a ete altere, deforme falsifie. > > ========================================================= > > This message and any attachments (the "message") are confidential, > intended solely for the addressees, and may contain legally privilegedxi > information. Any unauthorised 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. > > ========================================================= > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > http://perl-win32-gui.sourceforge.net/ > > -- View this message in context: http://www.nabble.com/detecting-a-second-version-of-my-app-tp17833771p17839551.html Sent from the perl-win32-gui-users mailing list archive at Nabble.com. |
From: Ilya B. <Ily...@so...> - 2008-06-14 12:05:44
|
If your running application has at least one window which is defined on startup and never gets destroyed, you can do a simple check. The example below assumes that your window has title "BLAH-BLAH-BLAH": my $CheckAlreadyRun = Win32::GUI::FindWindow('', 'BLAH-BLAH-BLAH'); if ($CheckAlreadyRun) { Win32::GUI::Show($CheckAlreadyRun); Win32::GUI::SetForegroundWindow($CheckAlreadyRun); exit; } In my example it just shows the window which is already exists. But you can do and error popup or whatever. Regards, _____ Ilya Bandorin -----Original Message----- From: per...@li... [mailto:per...@li...] On Behalf Of rpnoble Sent: Saturday, June 14, 2008 3:30 AM To: per...@li... Subject: [perl-win32-gui-users] detecting a second version of my app How can i detect a 2nd launch of my application, popup an error message and then exit? -- View this message in context: http://www.nabble.com/detecting-a-second-version-of-my-app-tp17833771p17 833771.html Sent from the perl-win32-gui-users mailing list archive at Nabble.com. ------------------------------------------------------------------------ - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Perl-Win32-GUI-Users mailing list Per...@li... https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users http://perl-win32-gui.sourceforge.net/ ========================================================= Ce message et toutes les pieces jointes (ci-apres le "message") sont confidentiels et susceptibles de contenir des informations couvertes par le secret professionnel. Ce message est etabli a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee interdite. Tout message eletronique est susceptible d'alteration. La SOCIETE GENERALE et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, deforme falsifie. ========================================================= This message and any attachments (the "message") are confidential, intended solely for the addressees, and may contain legally privilegedxi information. Any unauthorised 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. ========================================================= |
From: Brian M. <bmi...@hu...> - 2008-06-14 01:47:25
|
rpnoble wrote: > How can i detect a 2nd launch of my application, popup an error message and > then exit? > Look at the Win32::Mutex module. You register your app when it starts, and check if it's already running. If you need, I can give you some sample code. -- Brian, Tommy, Helen and Paka -- bmi...@hu... This message traveled at least 44,000 miles to reach you! --- avast! Antivirus: Outbound message clean. Virus Database (VPS): 080613-1, 06/13/2008 Tested on: 6/13/2008 9:46:47 PM avast! is copyright (c) 2000-2008 ALWIL Software. http://www.avast.com |
From: rpnoble <rp...@ib...> - 2008-06-13 23:30:10
|
How can i detect a 2nd launch of my application, popup an error message and then exit? -- View this message in context: http://www.nabble.com/detecting-a-second-version-of-my-app-tp17833771p17833771.html Sent from the perl-win32-gui-users mailing list archive at Nabble.com. |
From: Geoffrey S. <geo...@gm...> - 2008-06-10 12:23:28
|
Unfortunately, the TabStrip doesn't have the magic functionality you're looking for. It's just a row of buttons, not a set of neat little subwindows that you can switch between. What you want to do is create all of the buttons in your main window, hiding the ones that aren't in view controlled by the first button in the TabStrip. Then you hide or activate the appropriate controls in your window in the TabStrip's onChange handler. On Mon, Jun 9, 2008 at 6:14 AM, Brian Rowlands (Greymouth High School) <Row...@gr...> wrote: > Hi > > I've created a tabstrip and want to add a button to a tab but seem unable to > fathom out the precise syntax. Can someone guide me please? > > I have: > > …. > > $tabs = $main->AddTabStrip ( -name => "tab", -left => 150, -top => 10, > -width => 700, -height=> $height - 200, ); > > $tabs->InsertItem( -name=> "stock", -text => "Stock", -index=> 0 ); > > I tried adding a button several ways: > > 1. $main-> stock-> Addbutton( -text => 'Reset Fields', -pos => [10, > 10], -size => [30, 70], ); > > 2. $tabs-> stock-> Addbutton( -text => 'Reset Fields', -pos => [10, > 10], -size => [30, 70], ); > > 3. $main-> tab-> stock-> Addbutton( -text => 'Reset Fields', -pos => > [10, 10], -size => [30, 70], ); > > 4. $main-> $tabs-> stock-> Addbutton( -text => 'Reset Fields', -pos => > [10, 10], -size => [30, 70], ); > > I'm thinking my Perl is screwed up but I'm unsure where. Hope someone can > help. > > Thanks > Brian Rowlands > > Education is the best provision for the journey to old age. > > Aristotle > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > http://perl-win32-gui.sourceforge.net/ > |
From: Brian R. (G. H. School) <Row...@gr...> - 2008-06-09 10:16:31
|
Hi I've created a tabstrip and want to add a button to a tab but seem unable to fathom out the precise syntax. Can someone guide me please? I have: .... $tabs = $main->AddTabStrip ( -name => "tab", -left => 150, -top => 10, -width => 700, -height=> $height - 200, ); $tabs->InsertItem( -name=> "stock", -text => "Stock", -index=> 0 ); I tried adding a button several ways: 1. $main-> stock-> Addbutton( -text => 'Reset Fields', -pos => [10, 10], -size => [30, 70], ); 2. $tabs-> stock-> Addbutton( -text => 'Reset Fields', -pos => [10, 10], -size => [30, 70], ); 3. $main-> tab-> stock-> Addbutton( -text => 'Reset Fields', -pos => [10, 10], -size => [30, 70], ); 4. $main-> $tabs-> stock-> Addbutton( -text => 'Reset Fields', -pos => [10, 10], -size => [30, 70], ); I'm thinking my Perl is screwed up but I'm unsure where. Hope someone can help. Thanks Brian Rowlands Education is the best provision for the journey to old age. <http://www.quotationspage.com/quote/34568.html> Aristotle |
From: Brian R. (G. H. School) <Row...@gr...> - 2008-06-04 07:36:31
|
Thanks for that. Did some googling after your response and found the solution: ..... my $font = new Win32::GUI::Font( -name => "Courier New", -height => 10, -bold => 1, ); .... my $report = $main->AddRichEdit ( -name => 'Report', -pos => [10, 155], -size => [600,400], -disabled => 0, -vscroll => 1, -hscroll => 1, -font => $font, ); Thanks for taking the time to reply. Brian -----Original Message----- From: Geoffrey Spear [mailto:geo...@gm...] Sent: Tuesday, 3 June 2008 11:15 p.m. To: Brian Rowlands (Greymouth High School) Subject: Re: [perl-win32-gui-users] richedit formatting On Tue, Jun 3, 2008 at 6:32 AM, Brian Rowlands (Greymouth High School) <Row...@gr...> wrote: > Is that the solution? If so, how do I set the font for the control please? I believe you want SetCharFormat, which is documented, or SetParaFormat, which isn't but which sounds like it could be more appropriate. And while I haven't tested it, I know that tabbed columns don't line up right in any other application using proportional fonts so I'm 99% certain that you're right about that being your problem. |