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: <a98...@gm...> - 2007-07-11 14:01:22
|
hi, I have a small program which can be minimized to the tray. Now I want to have an accelerator which fires to minimize the program to the tray => this works fine. But know I want to restore the window with an accelerator anytime. It should work if I'm writing a text or in internet explorer or firefox ... everytime. is this possible? how can I install the accelerator so that it can be activated? thx. juergen -- Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten Browser-Versionen downloaden: http://www.gmx.net/de/go/browser |
From: Geoffrey S. <geo...@gm...> - 2007-07-11 11:11:43
|
You need to add -tabstop =3D> 1, to the options for any control that you want to be able to select with tab. On 7/11/07, Maxmelbin Neson (RBIN/EMT1) <Max...@in...> wrot= e: > > > > > Hello , > > How do I use DialogUI method to make my Window take "Tabs" etc =85. > > use Win32::GUI; > use Win32::GUI::GridLayout; > > $main =3D Win32::GUI::DialogBox->new(-name =3D> 'Main', > -text =3D> 'Perl Win32 GUI', > -width =3D> 550, > -height =3D> 650, > -maximizebox =3D> 0, > ); > > $worktext =3D $main->AddTextfield( > -width =3D> 300, > -height =3D> 26, > -left =3D> 20, > -top =3D> 20, > -readonly =3D> 0, > -position =3D> bottom, > -text =3D> $sel3, > ); > > > $filetext =3D $main->AddTextfield( > -name =3D> "list_file", > -width =3D> 300, > -height =3D> 26, > -left =3D> 20, > -top =3D> 90, > -readonly =3D> 0, > -position =3D> bottom, > -text =3D> $sel3, > ); > > $main->Show(); > Win32::GUI::Dialog(); > > Thanks and Regards > Maxmelbin Neson > -------------------------------------------------------------------------= ---------------------------------------- > Robert Bosch India Limited > Engineering Services - DS - Methods and Tools (RBIN/EMT1) > 123 Industrial Layout - Hosur Road - Bangalore 560 095 - INDIA > Telephone: +91 80 6657-4532 Fax: +91 80 6657-1404 > max...@in... > www.bosch.com > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > http://perl-win32-gui.sourceforge.net/ > --=20 Geoffrey Spear http://www.geoffreyspear.com/ |
From: Maxmelbin N. (RBIN/EMT1) <Max...@in...> - 2007-07-11 09:15:57
|
Hello , How do I use DialogUI method to make my Window take "Tabs" etc .... use Win32::GUI; use Win32::GUI::GridLayout; $main =3D Win32::GUI::DialogBox->new(-name =3D> 'Main', -text =3D> 'Perl Win32 GUI', -width =3D> 550, -height =3D> 650, -maximizebox =3D> 0, ); $worktext =3D $main->AddTextfield( -width =3D> 300, -height =3D> 26, -left =3D> 20, -top =3D> 20, -readonly =3D> 0, -position =3D> bottom, -text =3D> $sel3, ); $filetext =3D $main->AddTextfield( -name =3D> "list_file", -width =3D> 300, -height =3D> 26, -left =3D> 20, -top =3D> 90, -readonly =3D> 0, -position =3D> bottom, -text =3D> $sel3, ); $main->Show(); Win32::GUI::Dialog(); Thanks and Regards Maxmelbin Neson ------------------------------------------------------------------------ ----------------------------------------- Robert Bosch India Limited Engineering Services - DS - Methods and Tools (RBIN/EMT1) 123 Industrial Layout - Hosur Road - Bangalore 560 095 - INDIA Telephone: +91 80 6657-4532 Fax: +91 80 6657-1404 max...@in... www.bosch.com |
From: Perl R. <pe...@co...> - 2007-07-08 02:53:55
|
Hi all, I figured out how to load fonts directly from font files, so I'll share my story and hope this helps someone else! ########################################## use Win32::API; # First, export the AddFontResource function: my $addFontResource = Win32::API->new( 'gdi32', 'AddFontResource', 'P', 'I' ); # Next, call the function on the desired font file. In my case, the font file # is in the same directory as my script: $addFontResource->Call("Kristen ITC.ttf"); # The font is now in the system font table and can be called by name ("Kristen # ITC" in this example) as if it were installed in the %windir%\Fonts folder: my $kristenITC = Win32::GUI::Font->new ( -name => "Kristen ITC", -size => 14, -bold => 1, ); ########################################## My problem was actually a fundamental misunderstanding of .lib files versus .dll files. I was trying to call Win32::API on Gdi32.lib when I should have been calling it on gdi32.dll! Apparently .lib files just provide information/references for .dll files. So, when you find a really cool function in MSDN that references 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:pe...@co...] Sent: Friday, July 06, 2007 8:54 PM To: 'Win32 GUI Users Mailing List' Subject: Create font object from file? 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 throws an error that it's not a valid image file and may be corrupt. Thanks, Rob |
From: Perl R. <pe...@co...> - 2007-07-07 02:54:30
|
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 throws an error that it's not a valid image file and may be corrupt. Thanks, Rob |
From: Geoffrey S. <geo...@gm...> - 2007-07-06 12:49:57
|
For that you want Win32::GUI::MessageBox(). You can find all of the available options at http://perl-win32-gui.sourceforge.net/cgi-bin/docs.cgi?doc=reference-methods On 7/6/07, Maxmelbin Neson (RBIN/EMT1) <Max...@in...> wrote: > > Hello Geoffrey , > > Thanks a lot for the help .. > Today is my first day with Win32::Gui .. So a lot of questions .. > > Now I want to display an error message in a message box. > Is a message box already present in WIN32::GUI or should I create > another window to display the error with OK and Cancel prompt. > > > Thanks and Regards > Maxmelbin Neson > > > -----Original Message----- > From: Geoffrey Spear [mailto:geo...@gm...] > Sent: Friday, 6. July 2007 5:58 PM > To: Maxmelbin Neson (RBIN/EMT1) > Cc: per...@li... > Subject: Re: [perl-win32-gui-users] How to terminate a window in > Win32:GUI > > Maxmelbin, > > You simply need to return -1, the same as in your Main_Terminate > function. > > On 7/6/07, Maxmelbin Neson (RBIN/EMT1) <Max...@in...> > wrote: > > > > > > > > > > Hello , > > > > I have a button CANCEL which should close the window .. How to do it > ? What > > is the method > > My code .. > > > > use Win32::GUI; > > use Win32::GUI::GridLayout; > > > > $main = Win32::GUI::DialogBox->new(-name => 'Main', > > -text => 'Perl Win32 GUI', > > -width => 550, > > -height => 650, > > -maximizebox => 0, > > $main->AddButton( > > -name => "cancel", > > -width=>110, > > -height=>27, > > -left => 360, > > -top =>580, > > -text=>"CANCEL", > > ); > > > > $main->Show(); > > Win32::GUI::Dialog(); > > > > sub Main_Terminate { > > -1; > > } > > > > sub cancel_Click { > > ????? > > } > > > > > > Thanks and Regards > > Maxmelbin Neson > > > ------------------------------------------------------------------------ > ----------------------------------------- > > Robert Bosch India Limited > > Engineering Services - DS - Methods and Tools (RBIN/EMT1) > > 123 Industrial Layout - Hosur Road - Bangalore 560 095 - INDIA > > Telephone: +91 80 6657-4532 Fax: +91 80 6657-1404 > > max...@in... > > www.bosch.com > > > > > ------------------------------------------------------------------------ > - > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > _______________________________________________ > > Perl-Win32-GUI-Users mailing list > > Per...@li... > > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > > http://perl-win32-gui.sourceforge.net/ > > > > > -- > Geoffrey Spear > http://www.geoffreyspear.com/ > -- Geoffrey Spear http://www.geoffreyspear.com/ |
From: Maxmelbin N. (RBIN/EMT1) <Max...@in...> - 2007-07-06 12:36:50
|
Hello Geoffrey , Thanks a lot for the help .. Today is my first day with Win32::Gui .. So a lot of questions .. Now I want to display an error message in a message box. Is a message box already present in WIN32::GUI or should I create another window to display the error with OK and Cancel prompt.=20 Thanks and Regards Maxmelbin Neson -----Original Message----- From: Geoffrey Spear [mailto:geo...@gm...]=20 Sent: Friday, 6. July 2007 5:58 PM To: Maxmelbin Neson (RBIN/EMT1) Cc: per...@li... Subject: Re: [perl-win32-gui-users] How to terminate a window in Win32:GUI Maxmelbin, You simply need to return -1, the same as in your Main_Terminate function. On 7/6/07, Maxmelbin Neson (RBIN/EMT1) <Max...@in...> wrote: > > > > > Hello , > > I have a button CANCEL which should close the window .. How to do it ? What > is the method > My code .. > > use Win32::GUI; > use Win32::GUI::GridLayout; > > $main =3D Win32::GUI::DialogBox->new(-name =3D> 'Main', > -text =3D> 'Perl Win32 GUI', > -width =3D> 550, > -height =3D> 650, > -maximizebox =3D> 0, > $main->AddButton( > -name =3D> "cancel", > -width=3D>110, > -height=3D>27, > -left =3D> 360, > -top =3D>580, > -text=3D>"CANCEL", > ); > > $main->Show(); > Win32::GUI::Dialog(); > > sub Main_Terminate { > -1; > } > > sub cancel_Click { > ????? > } > > > Thanks and Regards > Maxmelbin Neson > ------------------------------------------------------------------------ ----------------------------------------- > Robert Bosch India Limited > Engineering Services - DS - Methods and Tools (RBIN/EMT1) > 123 Industrial Layout - Hosur Road - Bangalore 560 095 - INDIA > Telephone: +91 80 6657-4532 Fax: +91 80 6657-1404 > max...@in... > www.bosch.com > > ------------------------------------------------------------------------ - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > http://perl-win32-gui.sourceforge.net/ > --=20 Geoffrey Spear http://www.geoffreyspear.com/ |
From: Geoffrey S. <geo...@gm...> - 2007-07-06 12:28:14
|
Maxmelbin, You simply need to return -1, the same as in your Main_Terminate function. On 7/6/07, Maxmelbin Neson (RBIN/EMT1) <Max...@in...> wrote: > > > > > Hello , > > I have a button CANCEL which should close the window .. How to do it ? What > is the method > My code .. > > use Win32::GUI; > use Win32::GUI::GridLayout; > > $main = Win32::GUI::DialogBox->new(-name => 'Main', > -text => 'Perl Win32 GUI', > -width => 550, > -height => 650, > -maximizebox => 0, > $main->AddButton( > -name => "cancel", > -width=>110, > -height=>27, > -left => 360, > -top =>580, > -text=>"CANCEL", > ); > > $main->Show(); > Win32::GUI::Dialog(); > > sub Main_Terminate { > -1; > } > > sub cancel_Click { > ????? > } > > > Thanks and Regards > Maxmelbin Neson > ----------------------------------------------------------------------------------------------------------------- > Robert Bosch India Limited > Engineering Services - DS - Methods and Tools (RBIN/EMT1) > 123 Industrial Layout - Hosur Road - Bangalore 560 095 - INDIA > Telephone: +91 80 6657-4532 Fax: +91 80 6657-1404 > max...@in... > www.bosch.com > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > http://perl-win32-gui.sourceforge.net/ > -- Geoffrey Spear http://www.geoffreyspear.com/ |
From: Maxmelbin N. (RBIN/EMT1) <Max...@in...> - 2007-07-06 12:14:35
|
Hello , I have a button CANCEL which should close the window .. How to do it ? What is the method=20 My code .. use Win32::GUI; use Win32::GUI::GridLayout; $main =3D Win32::GUI::DialogBox->new(-name =3D> 'Main', -text =3D> 'Perl Win32 GUI', -width =3D> 550, -height =3D> 650, -maximizebox =3D> 0, $main->AddButton( -name =3D> "cancel", -width=3D>110, -height=3D>27, -left =3D> 360, -top =3D>580, -text=3D>"CANCEL", ); $main->Show(); Win32::GUI::Dialog(); sub Main_Terminate { -1; } sub cancel_Click { ????? } Thanks and Regards Maxmelbin Neson ------------------------------------------------------------------------ ----------------------------------------- Robert Bosch India Limited Engineering Services - DS - Methods and Tools (RBIN/EMT1) 123 Industrial Layout - Hosur Road - Bangalore 560 095 - INDIA Telephone: +91 80 6657-4532 Fax: +91 80 6657-1404 max...@in... www.bosch.com |
From: Geoffrey S. <geo...@gm...> - 2007-07-06 11:12:43
|
You use the exact same method: my $value = $chkb->Text(); On 7/6/07, Maxmelbin Neson (RBIN/EMT1) <Max...@in...> wrote: > > Thanks .. That helped > > One more question .. > > How do I retrieve the value form a text field to a variable ? > > > > -----Original Message----- > From: er...@ki... [mailto:er...@ki...] > Sent: Friday, 6. July 2007 12:19 PM > To: Maxmelbin Neson (RBIN/EMT1) > Subject: Re: [perl-win32-gui-users] How do I replace the text in > atextfield in Win32::GUI /textfield > > Quoting "Maxmelbin Neson (RBIN/EMT1)" <Max...@in...>: > > > > Right now I do it like this ... > > > > $chkb = $main->AddTextfield( > > -width => 100, > > -height => 30, > > -left => 100, > > -top => 10, > > -position => bottom, > > -text => $sel3, > > ); > > > > $sel3 = "new string"; > > Is there a better way ? > > $chkb->Text($sel3); > > > Working example: > use strict; > use Win32::GUI (); > > my $main = new Win32::GUI::Window ( > -name => "Window", > -title => "TekstFieldTest", > -pos => [100, 100], > -size => [400, 400], > > ) or die "new Window"; > my $chkb = $main->AddTextfield( > -width => 100, > -height => 30, > -left => 100, > -top => 10, > -text => "old", > ); > my $button= $main->AddButton( > -text => 'Change', > -size => [70,20], > -pos => > [$main->ScaleWidth()-156,$main->ScaleHeight()-25], > -onClick => sub {$chkb->Text("New"); }, > ); > > $main->Show(); > Win32::GUI::Dialog(); > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > http://perl-win32-gui.sourceforge.net/ > -- Geoffrey Spear http://www.geoffreyspear.com/ |
From: Maxmelbin N. (RBIN/EMT1) <Max...@in...> - 2007-07-06 07:49:18
|
Thanks .. That helped=20 One more question .. How do I retrieve the value form a text field to a variable ? -----Original Message----- From: er...@ki... [mailto:er...@ki...]=20 Sent: Friday, 6. July 2007 12:19 PM To: Maxmelbin Neson (RBIN/EMT1) Subject: Re: [perl-win32-gui-users] How do I replace the text in atextfield in Win32::GUI /textfield Quoting "Maxmelbin Neson (RBIN/EMT1)" <Max...@in...>: > Right now I do it like this ... > > $chkb =3D $main->AddTextfield( > -width =3D> 100, > -height =3D> 30, > -left =3D> 100, > -top =3D> 10, > -position =3D> bottom, > -text =3D> $sel3, > ); > > $sel3 =3D "new string"; > Is there a better way ? $chkb->Text($sel3); Working example: use strict; use Win32::GUI (); my $main =3D new Win32::GUI::Window ( -name =3D> "Window", -title =3D> "TekstFieldTest", -pos =3D> [100, 100], -size =3D> [400, 400], ) or die "new Window"; my $chkb =3D $main->AddTextfield( -width =3D> 100, -height =3D> 30, -left =3D> 100, -top =3D> 10, -text =3D> "old", ); my $button=3D $main->AddButton( -text =3D> 'Change', -size =3D> [70,20], -pos =3D> [$main->ScaleWidth()-156,$main->ScaleHeight()-25], -onClick =3D> sub {$chkb->Text("New"); }, ); $main->Show(); Win32::GUI::Dialog(); |
From: Maxmelbin N. (RBIN/EMT1) <Max...@in...> - 2007-07-06 06:03:44
|
Right now I do it like this ... $chkb =3D $main->AddTextfield( -width =3D> 100, -height =3D> 30, -left =3D> 100, -top =3D> 10, -position =3D> bottom, -text =3D> $sel3, ); $sel3 =3D "new string"; $chkb->SelectAll(); $chkb->ReplaceSel($sel3); Is there a better way ? Thanks and Regards Maxmelbin Neson ------------------------------------------------------------------------ ----------------------------------------- Robert Bosch India Limited Engineering Services - DS - Methods and Tools (RBIN/EMT1) 123 Industrial Layout - Hosur Road - Bangalore 560 095 - INDIA Telephone: +91 80 6657-4532 Fax: +91 80 6657-1404 max...@in... www.bosch.com |
From: pcourterelle <pco...@te...> - 2007-07-04 09:06:32
|
Rob, thanks for that...that drove me nuts for a while...what does SetTopIndex() do if it does ensure the value of the index is visible in the Listbox? The info says: SetTopIndex SetTopIndex(INDEX) Ensure that a particular item is visible in the Listbox of a Combobox. Just curious. Thanks phil ----- Original Message ----- From: "Robert May" <rob...@us...> To: "Jacques Choquette XX (QB/EMC)" <jac...@er...> Cc: <per...@li...> Sent: Thursday, June 28, 2007 3:04 PM Subject: Re: [perl-win32-gui-users] combobox > On 28/06/07, Jacques Choquette XX (QB/EMC) > <jac...@er...> wrote: >> I am trying to see the first item in the list that I have built for a >> combobox. When I run the script, the combobox is there but I cannot >> see the item like 'info'. What am I doing wrong? I am using Perl 5.8 on >> Windows 2000 >> >> $Window->AddCombobox( >> -name => "CB", >> -dropdown => 1, >> -left => 50, >> -top => 100, >> -height => 80, >> -width => 80, >> -hasstring => 1, >> -onChange => \&GetInfoCB, >> -tabstop => 1, >> # -uppercase => 1, >> # -sort => 1, >> ); >> $Window->CB->Add('none', 'info', 'warning', 'error'); >> $Window->CB->SetTopIndex('1'); >> $Window->CB->TopIndex('1'); >> $Window->CB->FirstVisibleItem('1'); > > Try this. > > > #!perl -w > use strict; > use warnings; > > use Win32::GUI qw(CW_USEDEFAULT); > > my $mw = Win32::GUI::Window->new( > -left => CW_USEDEFAULT, > -size => [400,300], > ); > > $mw->AddCombobox( > -name => "CB", > -dropdown => 1, > -left => 50, > -top => 100, > -height => 80, > -width => 80, > ); > $mw->CB->Add('none', 'info', 'warning', 'error'); > $mw->CB->SetCurSel(0); > > $mw->Show(); > Win32::GUI::Dialog(); > $mw->Hide(); > exit(0); > __END__ > > Regards, > Rob. > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > 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...> - 2007-07-03 23:55:15
|
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: ro...@th... [mailto:ro...@th...] On Behalf Of Robert May Sent: Tuesday, July 03, 2007 12:48 PM To: Perl Rob Cc: Win32 GUI Users Mailing List Subject: Re: [perl-win32-gui-users] How to catch unwanted Win32::Printer errors On 03/07/07, Perl Rob <pe...@co...> wrote: > > 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 created) > that my users will not understand and that I don't want them to see. Any > ideas on how I can suppress (or take control of) this behavior from > Win32::Printer? I expect that I need to use an eval block, but I'm not sure > how to use eval (getting all sorts of syntax errors). Here's my code: > > my $dc = new Win32::Printer > ( > papersize => LETTER, > dialog => NOSELECTION, > description => ' Coloring Page(s)', > unit => 'mm' > ); Rob, I've never used Win32::Print, but did take a quick ppek at the code. I think you can do something like this (completely untested): my $dc = eval { Win32::Printer->new( ... YOUR OPTIONS HERE ... ); }; if ($@) { # There was a die() in the eval if($^E != 1223) { # Win32::Printer does SetLastError(ERROR_CANCELLED) # if user presses cancel die $@; } else { # user cancelled, do something } } Regards, Rob. |
From: Robert M. <rob...@us...> - 2007-07-03 18:57:26
|
On 03/07/07, Steven Lloyd <sl...@ti...> wrote: > Is there a way to draw a line over a label? Mine keeps disappearing. I > cannot seem to get the DC lines thing to work, even without a label... Steve, I think you have a misunderstanding about how drawing works in windows. Windows doesn't remember anything about what you draw, and so every time it needs to re-draw a window it will have forgotten about what you drew previously. You need to draw during the window's WM_PAINT event which will be called by windows each time it need to redraw the window in question. Search the list archives for 'onPaint' and 'WM_PAINT' and you should find some examples of how to draw into a Win32::GUI::Window such that the drawing remains .... It's actually pretty difficult (maybe even impossible with the current Win32::GUI codebase) to draw on top of a label, whilst maintaining it's capabilities to draw the tet of your label. What is it that you are trying to represent on your UI? Perhaps we can suggest another way? Regards, Rob. |
From: Robert M. <rob...@us...> - 2007-07-03 18:47:45
|
On 03/07/07, Perl Rob <pe...@co...> wrote: > > 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 created) > that my users will not understand and that I don't want them to see. Any > ideas on how I can suppress (or take control of) this behavior from > Win32::Printer? I expect that I need to use an eval block, but I'm not sure > how to use eval (getting all sorts of syntax errors). Here's my code: > > my $dc = new Win32::Printer > ( > papersize => LETTER, > dialog => NOSELECTION, > description => ' Coloring Page(s)', > unit => 'mm' > ); Rob, I've never used Win32::Print, but did take a quick ppek at the code. I think you can do something like this (completely untested): my $dc = eval { Win32::Printer->new( ... YOUR OPTIONS HERE ... ); }; if ($@) { # There was a die() in the eval if($^E != 1223) { # Win32::Printer does SetLastError(ERROR_CANCELLED) # if user presses cancel die $@; } else { # user cancelled, do something } } Regards, Rob. |
From: Steven L. <sl...@ti...> - 2007-07-03 04:37:41
|
Is there a way to draw a line over a label? Mine keeps disappearing. I cannot seem to get the DC lines thing to work, even without a label... Steve <code> use strict; use Win32::GUI; our $mw = Win32::GUI::Window->new( -name => "MainWindow", -title => "Line Layer Test", -size => [400,400], -resizable => 0, -maximizebox => 0, ); # my $font=Win32::GUI::Font->new( # -name => 'Arial', # -width => 40, # -height => 60, # -bold => 1 # ); #$mw->AddLabel(-pos => [60,100],-text => "HELLO",-font => $font); my $DC = $mw->GetDC(); my $P = Win32::GUI::Pen->new( -color => [ 0,0,0 ], -width => 3, ); my $oldP = $DC->SelectObject($P); $DC->BeginPath(); $DC->MoveTo(50, 100); $DC->LineTo(200, 100); $DC->EndPath(); $DC->StrokePath(); $DC->SelectObject($oldP); $mw->Show(); Win32::GUI::Dialog(); exit; </code> |
From: Perl R. <pe...@co...> - 2007-07-03 03:41:45
|
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 created) that my users will not understand and that I don't want them to see. Any ideas on how I can suppress (or take control of) this behavior from Win32::Printer? I expect that I need to use an eval block, but I'm not sure how to use eval (getting all sorts of syntax errors). Here's my code: my $dc = new Win32::Printer ( papersize => LETTER, dialog => NOSELECTION, description => ' Coloring Page(s)', unit => 'mm' ); # If I click "Cancel", nothing hereafter will be executed. $dc->Image("file.bmp", 10, 10, 187, 258); $dc->Close(); Thanks in advance, Rob |
From: Robert M. <rob...@us...> - 2007-07-02 18:16:09
|
On 02/07/07, Octavian Rasnita <ora...@gm...> wrote: > Is it possible to display a Flash annimation in a window created with > Win32::GUI? > > If yes, please tell me how. I think that it should be possible to do it > using Win32::GUI::AxWindow but I don't know what control name to use in > the -control option. See below for an example. > BTW, for other type of controls, where can I find the control name I need to > use in a Win32::GUI::AxWindow object? If you haven't tried it, then there is an AxWindow demo distributed with Win32::GUI called 'InfoControl.pl' - it reads a list of all ActiveX components installed on your PC, and lets you selets one and see the propeties/methods available. By browsing the list you can usually make a pretty good guess as to what you're looking for. Regards, Rob. #!perl -w use strict; use warnings; # Demo of Shockwave flash player embedded in a window # using Win32::GUI::AxWindow. The Shockwave # player ActiveX control is available from www.adobe.com use Win32::GUI qw(WS_CLIPCHILDREN); use Win32::GUI::AxWindow(); # It appears that this must be a full URL, and not a relative path my $movie = 'file:///C:/TOUR.SWF'; # main Window my $mw = new Win32::GUI::Window ( -title => "Win32::GUI::AxWindow Shockwave Flash demo", -pos => [100, 100], -size => [400, 400], -name => "Window", -addstyle => WS_CLIPCHILDREN, -onResize => \&resize, ) or die "new Window"; # Create AxWindow my $Control = new Win32::GUI::AxWindow ( -parent => $mw, -name => "Control", -pos => [0, 0], -size => [400, 400], -control => "ShockwaveFlash.ShockwaveFlash", ) or die "new Control"; $Control->CallMethod("LoadMovie", 0, $movie); $Control->CallMethod("Play"); # Event loop $mw->Show(); Win32::GUI::Dialog(); $mw->Hide(); exit(0); # Main window event handler sub resize { my ($self) = @_; $self->Control->Resize ( ($self->GetClientRect)[2..3] ); return; } __END__ |
From: Octavian R. <ora...@gm...> - 2007-07-02 11:37:04
|
Hi, Is it possible to display a Flash annimation in a window created with Win32::GUI? If yes, please tell me how. I think that it should be possible to do it using Win32::GUI::AxWindow but I don't know what control name to use in the -control option. BTW, for other type of controls, where can I find the control name I need to use in a Win32::GUI::AxWindow object? Thank you. Octavian |
From: Robert M. <rob...@us...> - 2007-06-28 22:04:49
|
On 28/06/07, Jacques Choquette XX (QB/EMC) <jac...@er...> wrote: > I am trying to see the first item in the list that I have built for a > combobox. When I run the script, the combobox is there but I cannot > see the item like 'info'. What am I doing wrong? I am using Perl 5.8 on > Windows 2000 > > $Window->AddCombobox( > -name => "CB", > -dropdown => 1, > -left => 50, > -top => 100, > -height => 80, > -width => 80, > -hasstring => 1, > -onChange => \&GetInfoCB, > -tabstop => 1, > # -uppercase => 1, > # -sort => 1, > ); > $Window->CB->Add('none', 'info', 'warning', 'error'); > $Window->CB->SetTopIndex('1'); > $Window->CB->TopIndex('1'); > $Window->CB->FirstVisibleItem('1'); Try this. #!perl -w use strict; use warnings; use Win32::GUI qw(CW_USEDEFAULT); my $mw = Win32::GUI::Window->new( -left => CW_USEDEFAULT, -size => [400,300], ); $mw->AddCombobox( -name => "CB", -dropdown => 1, -left => 50, -top => 100, -height => 80, -width => 80, ); $mw->CB->Add('none', 'info', 'warning', 'error'); $mw->CB->SetCurSel(0); $mw->Show(); Win32::GUI::Dialog(); $mw->Hide(); exit(0); __END__ Regards, Rob. |
From: Jacques C. XX \(QB/EMC\) <jac...@er...> - 2007-06-28 20:17:18
|
I am trying to see the first item in the list that I have built for a combobox. When I run the script, the combobox is there but I cannot see the item like 'info' What am I doing wrong? I am using Perl 5.8 on Windows 2000 $Window->AddCombobox( -name =3D> "CB", -dropdown =3D> 1, -left =3D> 50, -top =3D> 100, -height =3D> 80, -width =3D> 80, -hasstring =3D> 1, -onChange =3D> \&GetInfoCB, -tabstop =3D> 1, # -uppercase =3D> 1, # -sort =3D> 1, ); $Window->CB->Add('none', 'info', 'warning', 'error'); $Window->CB->SetTopIndex('1'); $Window->CB->TopIndex('1'); $Window->CB->FirstVisibleItem('1'); ------------------------------------------------ From: Jacques Choquette Sun Hardware Admin Tel: 514-345-7900 x 43463 |
From: Robert M. <rob...@us...> - 2007-06-26 21:02:54
|
On 26/06/07, Glenn Linderman <pe...@ne...> wrote: > On approximately 6/26/2007 10:57 AM, came the following characters from > the keyboard of Perl Rob: > > > 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 access to the current directory is not a requirement? Consider > > the following code in BitmapInline.pm: > > > > sub new { > > my($class, $data) = @_; > > open(BMP, ">~$$.tmp") or return undef; > > binmode(BMP); > > print BMP MIME::Base64::decode($data); > > close(BMP); > > my $B = new Win32::GUI::Bitmap("~$$.tmp"); > > unlink("~$$.tmp"); > > return $B; > > } > > > > Could I simply change the 2^nd , 6^th , and 7^th lines in the > > subroutine so that my script will write to the root of the C:\ drive > > (as an example) instead of the current directory (see below)? > > > > sub new { > > my($class, $data) = @_; > > open(BMP, ">C:\\~$$.tmp") or return undef; > > binmode(BMP); > > print BMP MIME::Base64::decode($data); > > close(BMP); > > my $B = new Win32::GUI::Bitmap("C:\\~$$.tmp"); > > unlink("C:\\~$$.tmp"); > > return $B; > > > > } > > > > If this change will work, would it require me to re-compile Perl or do > > anything else special? I think it would work fine for you, but it's not a great solution. > Code like that should work... but you will have to reapply it each time > you install or upgrade Win32::GUI. Indeed. If you were to implement a solution that worked generally, then we could apply it to the core distribution, and everyone could benefit. (There's an outstanding bug report about this) > If you used $ENV{'TEMP'} instead, and make the filename > ~$$_bitmapinline.tmp (or something along that line) I'd change my > recommendation, although too long of a name might not be acceptable on > old versions of Win9x. Personally I'd use File::Temp if it is installed on the users system, falling back to the current directory (or perhaps $ENV{TEMP} or $ENV{TMP} if they exist). File::Temp goes to a lot of trouble to find a writable directory in a suitable (system specific) tmp location. > On the other hand, if it is possible to avoid writing the temporary > file, that would be an even better solution. I think it would be, > although I haven't figured out all the details. It's certainly doable, but significantly harder - it'd require some XS stuff to be written either in Win32::GUI::Bitmap or Win32::GUI::BitmapInline. If no one else wants to look into this I'll get around to it eventually, but not anytime soon. Regards, Rob. |
From: Perl R. <pe...@co...> - 2007-06-26 17:57:22
|
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 access to the current directory is not a requirement? Consider the following code in BitmapInline.pm: sub new { my($class, $data) = @_; open(BMP, ">~$$.tmp") or return undef; binmode(BMP); print BMP MIME::Base64::decode($data); close(BMP); my $B = new Win32::GUI::Bitmap("~$$.tmp"); unlink("~$$.tmp"); return $B; } Could I simply change the 2nd, 6th, and 7th lines in the subroutine so that my script will write to the root of the C:\ drive (as an example) instead of the current directory (see below)? sub new { my($class, $data) = @_; open(BMP, ">C:\\~$$.tmp") or return undef; binmode(BMP); print BMP MIME::Base64::decode($data); close(BMP); my $B = new Win32::GUI::Bitmap("C:\\~$$.tmp"); unlink("C:\\~$$.tmp"); return $B; } If this change will work, would it require me to re-compile Perl or do anything else special? Thanks, Rob |
From: Octavian R. <ora...@gm...> - 2007-06-20 19:45:21
|
Thank you! That was it. I didn't put a SecondWin_Terminate subroutine, because I thought if I don't use it, it would be just like using it and returning 0 but if the default is -1, then I need to use it explicitly. Thanks. Octavian ----- Original Message ----- From: "Robert May" <rob...@us...> To: "Octavian Rasnita" <ora...@gm...> Cc: <per...@li...> Sent: Wednesday, June 20, 2007 10:05 PM Subject: Re: [perl-win32-gui-users] creating a child window > On 20/06/07, Octavian Rasnita <ora...@gm...> wrote: >> I have tried to create a child window, but when I close it, the entire >> application closes. >> >> I open it with an option from the menu of the parent window that has >> a -onClick => \&Config, and I returned 0 or 1 from the sub Config {} >> subroutine, but the application still closes when closing that window. >> >> Are there any samples of using child windows? Or can you tell me how to >> do >> it? > > I think you mean an owned window, and not a child window? If so, then > there are examples in the demos (for example see the help menu option > in the NotifyIcon.pl demo). > > You want the -onTerminate handler of the owned window to return 1 (by > default it returns -1, which exits the Dialog() processing). > > If I'm mis-understanding you, then perhaps you could post a (small and > complete) example so that we can better understand what you are trying > to do. > > Regards, > Rob. |