Re: [perl-win32-gui-users] AcceleratorTable
The subs that you supplied do not respond to the keys either. Any more ideas? erick never stop questioning www.jeb.ca - Original Message - From: Peter Eisengrein I may be wrong, but I've found that you cannot call a _Click() directly (you actually have to Click on something). I'd try this with your subs: sub Open_Click { Open(); } sub Open { my $file=GUI::GetOpenFileName(-title=>"File To Open", -filter=>["*.*"],); } sub OpenHK_Click { Open; }
[perl-win32-gui-users] Ok I posted it once but now Im posting it in a different color
hi all I posted this question before and I didnt even get once response. So Im posting it in a different color. Please tell me if this question is totally off topic here . If it is , can anyone suggest a suitable mailing list for this question I thought since the finest win32 api minds hang out here I would post it here The code is taken from the actual example - $|=1; use Win32::RASE; print "\nI'm dialing via the first RAS entry: $first_RAS_entry\n\n"; ($UserName, $Password) = RasGetUserPwd($first_RAS_entry) or die Win32::RASE::FormatMessage; print "UserName:"; !$UserName ? chomp($UserName=<>) : print "$UserName\n"; print "Password:"; !$Password ? chomp($Password=<>) : print "$Password\n"; $hrasconn = RasDial($first_RAS_entry, undef , $UserName, $Password) or die Win32::RASE::FormatMessage; #($err, $status) = RasDial("CLICK", "DP 110-6511" , $UserName, $Password,undef,undef) # or die Win32::RASE::FormatMessage; print "Connected, \$hrasconn=$hrasconn\n"; print "\n\n--next line---\n\n"; #=== don't edit under this line == sub FindOpenedFolders () { # returns array of hwnd's of the opened folders my $findAfter = 0; my @folders; $FindWindowEx ||= new Win32::API("user32", "FindWindowEx", [N,N,P,P], N); while($findAfter = $FindWindowEx->Call(0, $findAfter, "CabinetWClass", 0)) { push @folders, $findAfter; } $findAfter = 0; while($findAfter = $FindWindowEx->Call(0, $findAfter, "ExploreWClass", 0)) { push @folders, $findAfter; } @folders; } sub CloseWindow ($) { # arg - hwnd $PostMessage ||= new Win32::API("user32", "PostMessage", [N,N,N,N], I); $WN_CLOSE = 0x10; $PostMessage->Call(shift, $WN_CLOSE, 0, 0); } BEGIN { require Win32::API; unless ($hwnd = (FindOpenedFolders())[0]) { system 'start explorer /n,C:\\'; $start_time = time; while (!($hwnd = (FindOpenedFolders())[0]) && $start_time+3 < time) {} $hwnd or die "Could not open C:\\ window\n"; $hwnd_opened = 1; } $first_RAS_entry = (RasEnumEntries())[0] or die "No one RAS entry were found\n"; } END { CloseWindow($hwnd) if $hwnd_opened } The above code when run , starts dialing right away ... but I want sample codes for 1) invoking the default original windows DUN dialog . 2) to check whether the user is connected to the internet 3) to disconnet from internet any help will be greatly appreciated or should I use any other perl module ? chris www.perl-resume.com
Re: Antwort: Re: [perl-win32-gui-users] Tabstrips
Hello Yes, i have the same problem ;o) I made a new version with click event working. I remove Groupbox and use a specific class for the Page of the TabStrip. So, event react now. I have a problem for read or use elements in this class without a specific reference. For exemple, $Win->Page0->SimpleLabel->Text("Click !!!") in the click event don't work. In the second sample, i attach an create all with $Win->Tab. I can use elements like this $Win->Tab->Page0->{"SimpleLabel"}->Text("Click !!!"). Don't understand why, but work. Laurent. - Original Message - From: <[EMAIL PROTECTED]> Subject: Antwort: Re: [perl-win32-gui-users] Tabstrips > Hi, > > seems that my joy was a little too early: If I create a button named "button" > and add it to a certain GroupBox (-parent => $Win->box) > then the subroutine "Button_Click" does not seem to react on my clicks on the > button... > > regards, > Thomas > <>
[perl-win32-gui-users] Style Option Bug?
When I create a label and/or combobox, give them color attributes and then try and use the -style option, the colors are completely ignored. That is, if I just use the control without the -style option, then the colors work. For example, the following works great: use Win32::GUI; $MainWin = new Win32::GUI::Window( -name => "MainWin", -text => "Style Option", -size => [200, 200], -pos => [70, 70], ); $MainWin->AddLabel( -text => "Hello World!", -size => [$MainWin->Width, $MainWin->Height], -pos => [0, 0], -background => [0,51,102], -foreground => [255,255,255], ); $MainWin->Show(); Win32::GUI::Dialog(); sub MainWin_Terminate { $MainWin->Hide(); return -1; } #--EOF---# However, this ignores the color option altogether: use Win32::GUI; $MainWin = new Win32::GUI::Window( -name => "MainWin", -text => "Style Option", -size => [200, 200], -pos => [70, 70], ); $MainWin->AddLabel( -text => "Hello World!", -size => [$MainWin->Width, $MainWin->Height], -pos => [0, 0], -style => ES_CENTER | WS_VISIBLE, -background => [0,51,102], -foreground => [255,255,255], ); $MainWin->Show(); Win32::GUI::Dialog(); sub MainWin_Terminate { $MainWin->Hide(); return -1; } #--EOF---# erick never stop questioning www.jeb.ca
Re: [perl-win32-gui-users] Style Option Bug?
Erick, It looks like it's only the ES_CENTER style that is not being handled/not being used properly. I tried adding "-align => center" and not modifying "-style", and it ends up with the same result. Perhaps others can give a little more insight as to why the style is not being applied correctly. In any case, I believe it would be better to move away from modifying "-style" directly and instead use "-align => center", to align the label. Or at least use "-addstyle" or "-pushstyle" instead of just "-style". Jeremy Blonde [EMAIL PROTECTED] --- "Erick J. Bourgeois" <[EMAIL PROTECTED]> wrote: > When I create a label and/or combobox, give them > color attributes and then try and use the -style > option, the colors are completely ignored. That is, > if I just use the control without the -style option, > then the colors work. For example, the following > works great: > > use Win32::GUI; > > $MainWin = new Win32::GUI::Window( > -name => "MainWin", > -text => "Style Option", > -size => [200, 200], > -pos => [70, 70], > ); > $MainWin->AddLabel( > -text => "Hello World!", > -size => [$MainWin->Width, $MainWin->Height], > -pos => [0, 0], > -background => [0,51,102], > -foreground => [255,255,255], > ); > $MainWin->Show(); > Win32::GUI::Dialog(); > > sub MainWin_Terminate { > $MainWin->Hide(); > return -1; > } > #--EOF---# > > However, this ignores the color option altogether: > > use Win32::GUI; > > $MainWin = new Win32::GUI::Window( > -name => "MainWin", > -text => "Style Option", > -size => [200, 200], > -pos => [70, 70], > ); > $MainWin->AddLabel( > -text => "Hello World!", > -size => [$MainWin->Width, $MainWin->Height], > -pos => [0, 0], > -style => ES_CENTER | WS_VISIBLE, > -background => [0,51,102], > -foreground => [255,255,255], > ); > $MainWin->Show(); > Win32::GUI::Dialog(); > > sub MainWin_Terminate { > $MainWin->Hide(); > return -1; > } > #--EOF---# > > > > erick > never stop questioning > www.jeb.ca > __ Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
Re: [perl-win32-gui-users] Style Option Bug?
Jeremy, I didn't know that there was an -align option, but that is not really what I was concerned with, it's the colors. Why can't you use the two color options (ie. -background and -foreground) ALL the time, with any control? erick never stop questioning www.jeb.ca - Original Message - From: Jeremy Blonde <[EMAIL PROTECTED]> To: Sent: Saturday, February 03, 2001 8:45 PM Subject: Re: [perl-win32-gui-users] Style Option Bug? > Erick, > > It looks like it's only the ES_CENTER style that is > not being handled/not being used properly. > > I tried adding "-align => center" and not modifying > "-style", and it ends up with the same result. > Perhaps others can give a little more insight as to > why the style is not being applied correctly. > > In any case, I believe it would be better to move away > from modifying "-style" directly and instead use > "-align => center", to align the label. Or at least > use "-addstyle" or "-pushstyle" instead of just > "-style". > > Jeremy Blonde > [EMAIL PROTECTED]
[perl-win32-gui-users] wishlist :)
Dear perl-win32-gui-users, hm.. again .. i'm really happy with the win32 development.. i got some simple questions (or more like a wishlist :) ) * is there a spreadsheet (grid) look-a-like solution or component ? * is there a inline webbrowser somewhere ? or a HTML or XML parser ? * is there support for JPG or common image formats like .PNG or .GIF? since i only found how to open a BITMAP image (i assume this is a .BMP file) what about licensing ? if i develop a product in perl with usage of the win32::gui module, and I spread (well lets asume for FREE) to the public.. is it still under GNU license or do we have to pay the win32::gui team something ? GREAT.. the win32::gui Best regards, Danny Zak mailto:[EMAIL PROTECTED] co-ceo Euro-Pictures/belGOnet.com Princesse Elisabeth Square 9/11 1030 Brussels Belgium Tel : +32-(0)2-215.67.65 Fax : +32-(0)2-215.66.65