[perl-win32-gui-users] Win32::CryptData crashing perl 5.10

2009-06-19 Thread Perl Rob
Hi all, I'm running Perl 5.10 on Windows XP. I'm writing a program that must decrypt some data using Microsoft's CryptUnprotectData() function. If I use Luigino Masarati's Win32::CryptData module (http://search.cpan.org/~lmasara/Win32-CryptData-0.02/CryptData.pm), my program decrypts the data

[perl-win32-gui-users] Is Win32::GUI::NotifyIcon thread safe?

2009-01-17 Thread Perl Rob
Hi all, I'm working on a program that, when launched, displays an icon (a Win32::GUI::NotifyIcon object) in the Windows taskbar notification area-often referred to as the "system tray". When one of the buttons on my GUI is clicked, a separate "worker" thread is created so that my GUI remains re

Re: [perl-win32-gui-users] Perl-Win32-GUI-Users Digest, Vol 30, Issue 2

2008-12-11 Thread Perl Rob
Hi Kieron, To find out what has been selected, use the GetCurSel() method to get the index number of the currently selected item, then use the GetString() method to get the text of the item at that index: my $change = sub() { my $num = $y->GetCurSel; my $text = $y->GetString($num); pr

Re: [perl-win32-gui-users] Refresh the taskbar

2008-12-07 Thread Perl Rob
r, WM_COMMAND, 424, 0, 0, 1000); By the way, I found a list of message numbers in the 3rd post here (although I'm still not sure where these message numbers are actually defined): http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/eb0b17d6- 66de-4ce6-bb3a-0c174a17991e

[perl-win32-gui-users] Refresh the taskbar

2008-12-07 Thread Perl Rob
Hi all, I've been banging my head against this one for the last several hours, so I'll buy a beer for the man or woman who helps me figure it out! :-) Quite simply, all I'm trying to do is programmatically toggle the "Lock the Taskbar" setting. However, I can't get the taskbar to refresh it

[perl-win32-gui-users] Threads

2008-11-06 Thread Perl Rob
Hi all, Am I susceptible to a crash if I create a Win32::GUI object (such as a label) in one thread, then call methods on that object in another thread? Following is an example of what I mean. Notice that I'm passing the label object as an argument to the entry point function of the new thr

Re: [perl-win32-gui-users] Avoid the appearance of a "frozen"

2008-06-19 Thread Perl Rob
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 wo

[perl-win32-gui-users] Avoid the appearance of a "frozen" window

2008-06-17 Thread Perl Rob
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

[perl-win32-gui-users] The -fill and -frame options of AddLabel

2008-06-16 Thread Perl Rob
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

Re: [perl-win32-gui-users] Marquee-style progress bar?

2008-02-08 Thread Perl Rob
Works like a charm! Thanks Rob! - 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] Marquee-style progress bar?

2008-02-08 Thread Perl Rob
Hi all, Is Win32::GUI() capable of creating a marquee-style progress bar for indicating activity instead of overall progress? This page in MSDN describes what I'm looking for: http://msdn2.microsoft.com/en-us/library/bb760820(VS.85).aspx TIA, Rob --

Re: [perl-win32-gui-users] FindWindow and SendMessage

2007-08-15 Thread Perl Rob
I don't understand *why* that fixed the problem, but it did. I couldn't get any windows to close until I did that-now I can close any window (that allows it) by finding its handle and sending it the WM_CLOSE message. -Rob _ From: Perl Rob [mailto:[EMAIL PROTECTED] Sent:

Re: [perl-win32-gui-users] FindWindow and SendMessage

2007-08-15 Thread Perl Rob
# This is a window started by another application $windowToClose->Win32::GUI::SendMessage("WM_CLOSE",0,0); # This fails because $windowToClose is not an object reference. ##### Thanks, Rob _ From: Perl Rob [mailto:[EMAIL PROTE

[perl-win32-gui-users] FindWindow and SendMessage

2007-08-15 Thread Perl Rob
Hi all, I'm attempting to close a window using the FindWindow() and SendMessage() functions as documented in MSDN. I can't get it to work, so I was wondering if anyone might help me see what's wrong with my code: ## use Win32::API;

Re: [perl-win32-gui-users] Create font object from file?

2007-07-07 Thread Perl Rob
ferences a .lib file (Gdi32.lib in my case), check to see if you have the .dll version of the file (gdi32.dll in my case). -Rob From: Perl Rob [mailto:[EMAIL PROTECTED] Sent: Friday, July 06, 2007 8:54 PM To: 'Win32 GUI Users Mailing List' Subject:

[perl-win32-gui-users] Create font object from file?

2007-07-06 Thread Perl Rob
Hi, Is it possible to create a Win32::GUI::Font object directly from a font file (e.g. "arial.ttf")? If not, does anyone have a good copy of Gdi32.lib? It has a function called AddFontResource() (which I could load with Win32::API) that's exactly what I'm looking for, but my Gdi32.lib file thro

Re: [perl-win32-gui-users] How to catch unwanted Win32::Printer errors

2007-07-03 Thread Perl Rob
Thanks Rob, that's exactly what I needed! As usual, you were right on the money--even with "completely untested" code. :) -Rob -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert May Sent: Tuesday, July 03, 2007 12:48 PM To: Perl Ro

[perl-win32-gui-users] How to catch unwanted Win32::Printer errors

2007-07-02 Thread Perl Rob
Hi all, When I run my code to print an image file, the standard "Print" dialog appears as expected, and my file is printed without problems if I click "OK". However, if I click "Cancel" on the dialog, Win32::Printer opens a dialog box with a cryptic error (about a printer object not being creat

[perl-win32-gui-users] Modify the behavior of Win32::GUI::BitmapInline

2007-06-26 Thread Perl Rob
Hi all, I'm using Win32::GUI::BitmapInline and I have just one problem with it: the requirement that my script have write access to the current directory. Here's my question: could I simply modify the code in the BitmapInline.pm file (located in "C:\Perl\site\lib\Win32\GUI") so that write acces

[perl-win32-gui-users] Toggle "always on top" status

2007-04-15 Thread Perl Rob
Hi, I'm using the "-topmost" option on my window to make it start out always on top. However, I'd like to provide a check box (labeled "Always on top" and checked by default) that allows the user to toggle whether the window stays on top or doesn't. Unfortunately, I can't get the change to take

Re: [perl-win32-gui-users] How can I get all the contents of a textfield?

2007-01-20 Thread Perl Rob
As always, thanks very much for the quick reply and simple solution! Glad to know I wasn't doing something "wrong". Thanks, Rob -Original Message- From: Robert May [mailto:[EMAIL PROTECTED] Sent: Saturday, January 20, 2007 7:26 AM To: Perl Rob Cc: Win32 GUI Users Maili

[perl-win32-gui-users] How can I get all the contents of a textfield?

2007-01-19 Thread Perl Rob
Hi all, I'm trying to do something that seems real simple: capture the contents (all the lines) of a text field and write them to a file. Since I can't see a more straightforward way of doing this, I wrote an algorithm that gets the number of lines in the text field, then gets each line (by its n

Re: [perl-win32-gui-users] How to pass $_ to a subroutine

2007-01-08 Thread Perl Rob
TED]; perl-win32-gui-users@lists.sourceforge.net Subject: RE: [perl-win32-gui-users] How to pass $_ to a subroutine Silly question, but why don't you use the NEM? Cheers, Jeremy. -Original Message- From: "Perl Rob" <[EMAIL PROTECTED]> To: "Win32 GUI Users Mailing Lis

[perl-win32-gui-users] How to pass $_ to a subroutine

2007-01-08 Thread Perl Rob
Hi all, Are you ready for this one? :) Let's see if I can even explain what I'm trying to do... I'm attempting to dynamically create buttons that use the -onClick option to go to a subroutine that is passed the name of the button. Why am I doing this, you ask? Well, since I don't know the name

[perl-win32-gui-users] Is it possible to print an inline bitmap using Win32::Printer?

2007-01-02 Thread Perl Rob
Hi all, I'd like to print inline bitmaps using the Win32::Printer module, but I'm confused by the "$dc" in every one of the documentation examples: # $image_handle = $dc->Image($filename); ($image_handle, $original_width, $original_height) = $dc->Image($filename);

Re: [perl-win32-gui-users] [win32-gui] Need help repainting window after clicking "Show Desktop"

2006-12-29 Thread Perl Rob
t May [mailto:[EMAIL PROTECTED] Sent: Thursday, December 28, 2006 12:31 PM To: Perl Rob Cc: Win32 GUI Users Mailing List Subject: Re: [win32-gui] [perl-win32-gui-users] Need help repainting window after clicking "Show Desktop" Perl Rob wrote: > Hi all, > > I've discovered a

[perl-win32-gui-users] Problem Printing Images

2006-12-27 Thread Perl Rob
Hi all, I'm getting the following error when attempting to print images (inline bitmaps or .bmp files) using the Image() function of Win32::Printer: "FreeImage is not supported in this build!" According to the Win32::Printer documentation, bitmap support is achieved by copying FreeImage.dll "

[perl-win32-gui-users] Need help repainting window after clicking "Show Desktop"

2006-12-26 Thread Perl Rob
Hi all, I've discovered a weird problem: if I minimize all open windows by clicking the "Show Desktop" button (from the Windows Quick Launch area) right before I run my Win32::GUI program, my program window opens and paints itself properly, but then immediately "hiccups" and loses all its images.

[perl-win32-gui-users] Need help placing controls on top of graphics

2006-12-21 Thread Perl Rob
Hi, I'm attempting to place a scrollable text field on top of the background image of my window. Unfortunately, if I add the text field to the window first (i.e. before adding the graphic to the window), then the text field gets "swallowed up" by the graphic, and the only way to see the text fiel