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: Jaun <teh...@gm...> - 2008-11-04 09:32:08
|
I don't have an active license for perlapp so I've been using PP. Reshacker looks good, as long as the end result is the same it should do fine, thanks. On Tue, Nov 4, 2008 at 8:12 PM, Jeremy White <jez...@ho...> wrote: > > Hi, > > When packing the script into an exe what tool are you using? If you are > using PerlApp from activestate you may need to update to a later version as > I think it adds a manifest to the exe which overrides any file based > manifest. You can manually change the manifest with a tool such as reshacker > to force it to use XP styles. > > As a side the manifest file should always match the name of the exe being > run. > > Cheers, > > Jez. > ________________________________ > > Date: Tue, 4 Nov 2008 18:50:55 +1100 > > From: teh...@gm... > > To: per...@li... > > Subject: [perl-win32-gui-users] Win XP styles > > > > Hi, > > > > I've been trying to get a listview which looks like this: > http://delphitutorial.info/wp-content/uploads/2007/07/next-grid.jpg as > opposed to the old (and ugly) style: > http://www.knowdotnet.com/articles/PrintListViewDemoForm.jpg > > > > Robert's perl.exe.manifest file did the trick only it doesn't work after > packing the script to an exe. Is there another way to use xp styles? > > > > > > Also on the subject of Listview, how do you get row sorting > functionality? (with an arrow on the column which the rows are being sorted > by) > > > > > > Any help appreciated, > > > > -Jaun > > _________________________________________________________________ > X Factor: latest video, features and more. Click here! > http://clk.atdmt.com/GBL/go/115454063/direct/01/ |
From: Jeremy W. <jez...@ho...> - 2008-11-04 09:12:46
|
Hi, When packing the script into an exe what tool are you using? If you are using PerlApp from activestate you may need to update to a later version as I think it adds a manifest to the exe which overrides any file based manifest. You can manually change the manifest with a tool such as reshacker to force it to use XP styles. As a side the manifest file should always match the name of the exe being run. Cheers, Jez. ________________________________ > Date: Tue, 4 Nov 2008 18:50:55 +1100 > From: teh...@gm... > To: per...@li... > Subject: [perl-win32-gui-users] Win XP styles > > Hi, > > I've been trying to get a listview which looks like this: http://delphitutorial.info/wp-content/uploads/2007/07/next-grid.jpg as opposed to the old (and ugly) style: http://www.knowdotnet.com/articles/PrintListViewDemoForm.jpg > > Robert's perl.exe.manifest file did the trick only it doesn't work after packing the script to an exe. Is there another way to use xp styles? > > > Also on the subject of Listview, how do you get row sorting functionality? (with an arrow on the column which the rows are being sorted by) > > > Any help appreciated, > > -Jaun _________________________________________________________________ X Factor: latest video, features and more. Click here! http://clk.atdmt.com/GBL/go/115454063/direct/01/ |
From: Jaun <teh...@gm...> - 2008-11-04 07:50:59
|
Hi, I've been trying to get a listview which looks like this: http://delphitutorial.info/wp-content/uploads/2007/07/next-grid.jpg as opposed to the old (and ugly) style: http://www.knowdotnet.com/articles/PrintListViewDemoForm.jpg Robert's perl.exe.manifest file did the trick only it doesn't work after packing the script to an exe. Is there another way to use xp styles? Also on the subject of Listview, how do you get row sorting functionality? (with an arrow on the column which the rows are being sorted by) Any help appreciated, -Jaun |
From: <Dav...@la...> - 2008-09-26 17:35:48
|
Hi All, I am trying to code Chevron menus and am running into trouble with RemoveMenu(). The code below should work, but alas, it does not remove any of the menu items and the full menu is displayed off the Rebar Chevron no matter how may items I attempt to remove. Note: I AM calling DrawMenuBar after modifying the menu. Does anyone have any experience or advice on this issue? #------------------------------------------------------------------------------ sub Rebar_ChevronPushed { my($bandIndex, $left, $top, $right, $bottom) = @_; my %band = $main->Rebar->GetBandInfo($bandIndex); my $toolbar = $band{-child}; #Handle to Rebar Band Child.. say "Rebar Band Child Handle: ", $toolbar if $DEBUG; my $buttonCount = Win32::GUI::Toolbar::ButtonCount($toolbar); my $toolbarWidth = Win32::GUI::Width($toolbar); say "Button Count: ", $buttonCount if $DEBUG; foreach my $index(1..$buttonCount){ my ($left, $top, $right, $bottom) = Win32::GUI::Toolbar::GetRect($toolbar, $index); if ($right > $toolbarWidth) { say "Button ", $index, " is Hidden" if $DEBUG; say join(", ", Win32::GUI::Toolbar::GetRect($toolbar, $index)) if $DEBUG; } else { say "Removing Menu Position: ", $index - 1; $toolbarMenus->RemoveMenu($index - 1, MF_BYPOSITION); } } $main->Rebar->DrawMenuBar(); say "Chevron on Band ", $bandIndex, " pushed... Pop a menu!" if $DEBUG; my $menu = $toolbarMenus->{Toolbar}; $main->TrackPopupMenu( $menu, $main->ClientToScreen($left, $bottom), ); return 0; } #------------------------------------------------------------------------------ TIA! David J. Keith Application Developer Latham International ● 787 Watervliet-Shaker Rd. ● Latham, NY 12110 Office: 518.951.1063 |
From: <Dav...@la...> - 2008-09-23 16:30:27
|
Hello All, Here is another Win32::GUI CONSTANT that appears to be missing: C:\Documents and Settings\DKeith1\My Documents\My Projects\working\perl\trunk>PO MsGUI.pl "TBN_GETINFOTIP" is not exported by Win32::GUI::Constants at C:/Perl/site/lib/Wi n32/GUI.pm line 80 SetExtendedStyle SetExtendedStyle(STYLE) Sets the extended style for the toolbar. STYLE should be one or more style flags bitwise-ORed together. Extended style flag constants are as follows: TBSTYLE_EX_MIXEDBUTTONS This style allows you to set text for all buttons, but only display it for those buttons with the BTNS_SHOWTEXT button style. The TBSTYLE_LIST style must also be set. Normally, when a button does not display text, your application must handle TBN_GETINFOTIP to display a ToolTip. With the TBSTYLE_EX_MIXEDBUTTONS extended style, text that is set but not displayed on a button will automatically be used as the button's ToolTip text. Your application only needs to handle TBN_GETINFOTIP if it needs more flexibility in specifying the ToolTip text. I will log issue/bugs on these if someone can confirm that they are indeed missing from Win32::GUI:Constants David J. Keith Application Developer Latham International ● 787 Watervliet-Shaker Rd. ● Latham, NY 12110 Office: 518.951.1063 |
From: <Dav...@la...> - 2008-09-22 20:30:00
|
Hello All, "CCS_ADJUSTABLE" is not exported by Win32::GUI::Constants at C:/Perl/site/lib/Wi n32/GUI.pm line 80. (Robert).... Should it be? >From the Toolbar Docs: SetStyle SetStyle(STYLE) Sets the style for the toolbar. STYLE should be one or more style flags bitwise-ORed together. Style flag constants are as follows: TBSTYLE_ALTDRAG Allows users to change a toolbar button's position by dragging it while holding down the ALT key. If this style is not specified, the user must hold down the SHIFT key while dragging a button. Note that the CCS_ADJUSTABLE style must be specified to enable toolbar buttons to be dragged. TIA ! David J. Keith Application Developer Latham International ● 787 Watervliet-Shaker Rd. ● Latham, NY 12110 Office: 518.951.1063 |
From: Steven L. <sl...@ti...> - 2008-09-21 04:57:01
|
I notice there are several options when creating a window to display the help button in the top right corner. However, I do not understand how to use it so that the help window pops up with information when a control is selected by the user. I have searched the documentation and this list with no avail. Can anyone help? Steve |
From: Steven L. <sl...@ti...> - 2008-09-10 12:03:09
|
I get the following error when trying to use DIBitmap on Windows 98. Is there a workaround? My script is simple. ------------------ use Win32::GUI; use Win32::GUI::DIBitmap; print "hello"; exit; Error: --------------------- Can't load 'C:/perl/site/lib/auto/Win32/GUI/DIBitmap/DIBitmap.dll' for module Win32::GUI::DIBitmap: load_file:One of the library files needed to run this application cannot be found at C:/perl/lib/DynaLoader.pm line 229. at dibtest.pl line 1 Compilation failed in require at dibtest.pl line 1. BEGIN failed--compilation aborted at dibtest.pl line 1. |
From: Ilya B. <Ily...@so...> - 2008-09-05 06:18:01
|
Yeah, but this method is OK only if users use XP’s standard color schemes and themes. In other case tabstrips could be not “white”. At the moment I have two ideas but can realize none of them. :) 1. According to the same problem in other programming environments, there should be some constants which allow us to determine if XP UI is enabled or not. Can’t find such a constant for Perl win32::GUl. 2. The ideal solution is to have controls with transparent background. Maybe there is any -exstyle or something for that? Can’t find it yet also. :( From: per...@li... [mailto:per...@li...] On Behalf Of Dav...@la... Sent: Thursday, September 04, 2008 10:40 PM To: Jeremy White Cc: per...@li... Subject: Re: [perl-win32-gui-users] (no subject) Thanks Jeremy, Unfortunately I did not want yet ANOTHER widget piled up on top of the TabStrip :) so I ended up using -foreground => [252, 252, 252] for each offending control. I also had to revert from using the -prompt option of TextFields to using a TextField with a label instead. the [252, 252, 252] color rendered close enough to the background color of the tabstrip such that it is almost impossible to perceive any difference between the two. I'll stick with this for now, might change it later using your method if it proves more feasible. David J. Keith Application Developer Latham International ● 787 Watervliet-Shaker Rd. ● Latham, NY 12110 Office: 518.951.1063 |
From: <Dav...@la...> - 2008-09-04 18:40:05
|
Thanks Jeremy, Unfortunately I did not want yet ANOTHER widget piled up on top of the TabStrip :) so I ended up using -foreground => [252, 252, 252] for each offending control. I also had to revert from using the -prompt option of TextFields to using a TextField with a label instead. the [252, 252, 252] color rendered close enough to the background color of the tabstrip such that it is almost impossible to perceive any difference between the two. I'll stick with this for now, might change it later using your method if it proves more feasible. David J. Keith Application Developer Latham International ● 787 Watervliet-Shaker Rd. ● Latham, NY 12110 Office: 518.951.1063 |
From: Jeremy W. <jez...@ho...> - 2008-09-04 17:42:14
|
My understanding is that this isn't a bug, as all development tools would have the same issue. You should be able to go a google on other on toolsets (such as VB/C++) and find a solution. The way I get around the issue is to create a child window over the tab and place the controls on the child window. Works for both XP and Vista. Cheers, Jeremy. ________________________________ > To: per...@li... > From: Dav...@la... > Date: Thu, 4 Sep 2008 12:05:24 -0400 > Subject: [perl-win32-gui-users] (no subject) > > > OK... Asking again, someone please answer, even if it's "There is no fix at the time". > > After enabling the new WinXP style UI, Labels on a Tab Strip have the default 'grey' color on a 'white/silver' Tab Strip, > How can I fix this, it looks UGLY and is not acceptable for a production application. > > Thanks in advance. > > David J. Keith > Application Developer > Latham International ● 787 Watervliet-Shaker Rd. ● Latham, NY 12110 > Office: 518.951.1063 _________________________________________________________________ Discover Bird's Eye View now with Multimap from Live Search http://clk.atdmt.com/UKM/go/111354026/direct/01/ |
From: <Dav...@la...> - 2008-09-04 16:05:16
|
OK... Asking again, someone please answer, even if it's "There is no fix at the time". After enabling the new WinXP style UI, Labels on a Tab Strip have the default 'grey' color on a 'white/silver' Tab Strip, How can I fix this, it looks UGLY and is not acceptable for a production application. Thanks in advance. David J. Keith Application Developer Latham International ● 787 Watervliet-Shaker Rd. ● Latham, NY 12110 Office: 518.951.1063 |
From: zak3 <zak...@gm...> - 2008-09-01 06:50:42
|
hi this is a new link for gb109.rar, it is permanent since google does not delete sites nor email accounts: http://sites.google.com/site/zak31415/Home/gb109.rar or visit: http://sites.google.com/site/zak31415/ and look for the attachment below that page regards Emmanuel E wrote: > > Hi Zak, > > Can you please share the file once again? The 2shared.com link is not > working. Can it be uploaded permanently to sourceforge? > > Thanks, > Emmanuel > ----- Original Message ----- > From: zak > To: per...@li... > Sent: Friday, February 29, 2008 9:27 PM > Subject: [perl-win32-gui-users] GUI Builder (gb109) > > > hi > gui builder by David Hiltz "gb109" wich you can download from: > ftp://ftp.wh.whoi.edu/pub/gb109.zip > does not run correctly in perl 5.8-5.10 using their appropriate > win32-gui > i have tried perl 5.6 with win-api and an old win32-gui, > and it is stable , so you can design small forms and save them , after > that > you can add your code, and any corrections, and run it in perl > 5.8...5.10 > because it is hard to switch to perl 5.6 to run the program, > i have used pdk 6 to convert the gb.pl file to the executable gb.exe > so to play with a small number (but important) of win32-gui toys just > run the gb.exe, and > please keep this file it its folder > sometimes we do not see the toolbar buttons, i have found that just > double click the file widgets.bmp to open it will correct the problem. > strange. > download the new gb109.rar file from: > http://www.2shared.com/file/2916295/215f9202/gb109.html > > regards > zak > > > ------------------------------------------------------------------------------ > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > http://perl-win32-gui.sourceforge.net/ > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the > world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > 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/GUI-Builder-%28gb109%29-tp15762632p19249692.html Sent from the perl-win32-gui-users mailing list archive at Nabble.com. |
From: Emmanuel E <emm...@gm...> - 2008-08-30 07:45:57
|
Hi Zak, Can you please share the file once again? The 2shared.com link is not working. Can it be uploaded permanently to sourceforge? Thanks, Emmanuel ----- Original Message ----- From: zak To: per...@li... Sent: Friday, February 29, 2008 9:27 PM Subject: [perl-win32-gui-users] GUI Builder (gb109) hi gui builder by David Hiltz "gb109" wich you can download from: ftp://ftp.wh.whoi.edu/pub/gb109.zip does not run correctly in perl 5.8-5.10 using their appropriate win32-gui i have tried perl 5.6 with win-api and an old win32-gui, and it is stable , so you can design small forms and save them , after that you can add your code, and any corrections, and run it in perl 5.8...5.10 because it is hard to switch to perl 5.6 to run the program, i have used pdk 6 to convert the gb.pl file to the executable gb.exe so to play with a small number (but important) of win32-gui toys just run the gb.exe, and please keep this file it its folder sometimes we do not see the toolbar buttons, i have found that just double click the file widgets.bmp to open it will correct the problem. strange. download the new gb109.rar file from: http://www.2shared.com/file/2916295/215f9202/gb109.html regards zak ------------------------------------------------------------------------------ ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ ------------------------------------------------------------------------------ _______________________________________________ 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: rommi <rom...@ya...> - 2008-08-25 11:16:01
|
Hi all, i want to find a perl-module/function to watch mouse events (left click, right click, double click and so on) on the desktop. I want to know if mouse event happens on the desktop (click on the desktop) or any window (not only tk created windows) that is on the desktop. May be i can realize this with win32::gui? My operating systems is Windows. Does anybody has a hint for me? thanks a lot for every reply, and best regards rommi -- View this message in context: http://www.nabble.com/mouse-event-tp19141942p19141942.html Sent from the perl-win32-gui-users mailing list archive at Nabble.com. |
From: Ross59 <cl...@ho...> - 2008-08-20 20:56:57
|
Read the realease notes for v1.06 section titled "Deprecated feature status". You need to update the Loft modules to conform to the new method for calling constants (changed from v1.03 onwards). tallulah wrote: > > i have a problem with the GUI Loft, the programs designed with it are > launched after 5-10 seconds, this is happened with win32gui v1.04 - v1.05- > v1.06 but not with older versions, are there anyone who have a cure to > this problem since it is a very good software, and the author seems > stopped developing it, it's new site in: > http://www.darserman.com/Perl/Loft/ > > -- View this message in context: http://www.nabble.com/GUI-LOft-tp18870625p19077895.html Sent from the perl-win32-gui-users mailing list archive at Nabble.com. |
From: tallulah <my....@gm...> - 2008-08-07 13:34:51
|
i have a problem with the GUI Loft, the programs designed with it are launched after 5-10 seconds, this is happened with win32gui v1.04 - v1.05- v1.06 but not with older versions, are there anyone who have a cure to this problem since it is a very good software, and the author seems stopped developing it, it's new site in: http://www.darserman.com/Perl/Loft/ -- View this message in context: http://www.nabble.com/GUI-LOft-tp18870625p18870625.html Sent from the perl-win32-gui-users mailing list archive at Nabble.com. |
From: Salvador O. G. <so...@ms...> - 2008-07-24 04:46:55
|
On Wed, 2008-07-23 at 15:09 -0400, Roode, Eric wrote: > I just spent the past few hours debugging this. I have narrowed down > the problem to the scope of the font object. > Yes, known bug. > > More importantly: Are there any other things that I don't know about > that are going to bite me if they go out of scope? Out of my head: fonts, cursors, menus, icons, bitmaps and accelerators. > I am trying to make my initialization and setup code modular, so it can > actually be maintained, instead of one big glomp of spaghetti. This > sort of behavior does not help. > Try to store the perl object in the container window: sub initiaalize_heading { my $win = shift; my $font = ...; my $lab = $win->AddLabel(...,-font => $font); # Workaround for window not storing the perl object. $lab->{_Font} = $font; # I use the '_' prefix to avoid name # clashes with children. ... } |
From: rpnoble <rp...@ib...> - 2008-07-24 02:53:01
|
Eric; I have always treated fonts like menus. Both must be defined before the main window is defined. Using this method I have never had any out of scope errors. Roode, Eric wrote: > > I just spent the past few hours debugging this. I have narrowed down > the problem to the scope of the font object. > > Here are two simple, complete test programs. > > ======== example 1 > use Win32::GUI; > > my $main = Win32::GUI::Window->new > ( > -name => 'Main', > -width => 350, > -height => 250, > -left => 300, > -top => 200, > -text => 'Font test', > ); > > initialize_heading($main); > > $main->Show(); > Win32::GUI::Dialog(); > > sub Main_Terminate { -1 } > > sub initialize_heading > { > my $win = shift; > > my $font = Win32::GUI::Font->new > ( > -name => 'Arial', > -size => 14, > -italic => 1, > ); > > $win->AddLabel(-name => 'heading', -text => "Font test", > -width => 150, -height => 30, > -font => $font); > } > ======== end example 1 > > ======== example 2 > use Win32::GUI; > > my $main = Win32::GUI::Window->new > ( > -name => 'Main', > -width => 350, > -height => 250, > -left => 300, > -top => 200, > -text => 'Font test', > ); > > my $font = Win32::GUI::Font->new > ( > -name => 'Arial', > -size => 14, > -italic => 1, > ); > > > initialize_heading($main); > > $main->Show(); > Win32::GUI::Dialog(); > > sub Main_Terminate { -1 } > > sub initialize_heading > { > my $win = shift; > > $win->AddLabel(-name => 'heading', -text => "Font test", > -width => 150, -height => 30, > -font => $font); > } > ======== end example 2 > > These two examples are very similar. The only difference is the > location of the "my $font" line. The first example localizes the > variable to the initialize_heading subroutine. This does not work! > When the window is displayed, the label is drawn with the wrong font. > > The second example makes the font variable global to the file scope. > This example works: the label is drawn with the correct font. > > Why on earth would the font variable need to be global? How the heck is > anyone supposed to know this? I would have assumed that the hash of > parameters to any control would have been copied into the control > object, and thus still have a nonzero reference count. Apparently > that's not the case. Is it ever safe to undefine or redefine a font > variable, or let it go out of scope? Is this documented anywhere? > > More importantly: Are there any other things that I don't know about > that are going to bite me if they go out of scope? > > I am trying to make my initialization and setup code modular, so it can > actually be maintained, instead of one big glomp of spaghetti. This > sort of behavior does not help. > > Eric > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the > world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > 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/Font-must-remain-in-scope---tp18618223p18624556.html Sent from the perl-win32-gui-users mailing list archive at Nabble.com. |
From: Roode, E. <er...@ba...> - 2008-07-23 19:09:39
|
I just spent the past few hours debugging this. I have narrowed down the problem to the scope of the font object. Here are two simple, complete test programs. ======== example 1 use Win32::GUI; my $main = Win32::GUI::Window->new ( -name => 'Main', -width => 350, -height => 250, -left => 300, -top => 200, -text => 'Font test', ); initialize_heading($main); $main->Show(); Win32::GUI::Dialog(); sub Main_Terminate { -1 } sub initialize_heading { my $win = shift; my $font = Win32::GUI::Font->new ( -name => 'Arial', -size => 14, -italic => 1, ); $win->AddLabel(-name => 'heading', -text => "Font test", -width => 150, -height => 30, -font => $font); } ======== end example 1 ======== example 2 use Win32::GUI; my $main = Win32::GUI::Window->new ( -name => 'Main', -width => 350, -height => 250, -left => 300, -top => 200, -text => 'Font test', ); my $font = Win32::GUI::Font->new ( -name => 'Arial', -size => 14, -italic => 1, ); initialize_heading($main); $main->Show(); Win32::GUI::Dialog(); sub Main_Terminate { -1 } sub initialize_heading { my $win = shift; $win->AddLabel(-name => 'heading', -text => "Font test", -width => 150, -height => 30, -font => $font); } ======== end example 2 These two examples are very similar. The only difference is the location of the "my $font" line. The first example localizes the variable to the initialize_heading subroutine. This does not work! When the window is displayed, the label is drawn with the wrong font. The second example makes the font variable global to the file scope. This example works: the label is drawn with the correct font. Why on earth would the font variable need to be global? How the heck is anyone supposed to know this? I would have assumed that the hash of parameters to any control would have been copied into the control object, and thus still have a nonzero reference count. Apparently that's not the case. Is it ever safe to undefine or redefine a font variable, or let it go out of scope? Is this documented anywhere? More importantly: Are there any other things that I don't know about that are going to bite me if they go out of scope? I am trying to make my initialization and setup code modular, so it can actually be maintained, instead of one big glomp of spaghetti. This sort of behavior does not help. Eric |
From: Geoffrey S. <geo...@gm...> - 2008-07-23 16:57:36
|
On Wed, Jul 23, 2008 at 12:36 PM, Glenn Linderman <pe...@ne...> wrote: > On approximately 7/23/2008 3:45 AM, came the following characters from > the keyboard of glass: >> i have added a menu also. >> for the people who say why we need a webbrowser to display pictures, i say >> that the animated pictures are not displayed correctly by most images >> viewers , try this picture of an animated crocroach: >> http://img145.imageshack.us/my.php?image=cockroachzm9.gif >> only in a webbrowser it is displayed correctly. > > > I've never used AxWindow, so I can't help with that. I'd be interested > to know, though, if AxWindow can be used to display IrfanView Windows. > > Your statement that an animated cockroach cannot be displayed correctly > in anything but a webbrowser is false, however. After digging past the > HTML you pointed to in your link to find the actual .gif file, I was > able to download and display the cockroach in IrfanView just fine. > Looks the same as in SeaMonkey browser (which shares the same display > code as Firefox). > > So IrfanView is a much lighter-weight application to load than Firefox, > and likely much more secure than either Firefox or any other web > browser, if your goal is just to display images. A startup parameter > allows scaling of the image to any size window (fit image to window). The Win32-GUI wiki also includes this tip on displaying animated GIFs using ImageMagick: http://perl-win32-gui.sourceforge.net/cgi-bin/wiki.cgi?Displaying_Animated_GIFs_Using_ImageMagick I'd imagine this would be more efficient than using an AxWindow running any external application, although I haven't done any profiling to prove it. |
From: glass <gla...@ya...> - 2008-07-23 10:44:58
|
i have firefox v 1.5, then by changing the line: -control => "Shell.Explorer.2", with -control => "Shell.FireFox", and it is working the same as before. in any case i have a problem with the -size option in AxWindow, whether i choose -size => [400, 400], or -size => [10, 10], it remains the same size of the parent window, also the vertical scroll bars does not appear unless we choose an option: -style => WS_VISIBLE | WS_VSCROLL | WS_HSCROLL, so the axwindow will be in a separate window you can move it. there is a tutorial by rob may about scrollbars in: http://blog.robmay.me.uk/search/label/perl-win32-gui i will study it to see if it is applicable in this situation. anyway in the html coding we can choose to display pictures to fit to window, so i have added a checkbox if it is checked then the pictures will be displayed to fit the window, but in this case the small pics will be stretched so it will be ugly. so we can manage to display with this option only if the size of the picture are bigger than the window , i have a vb6 program wich manage this. i need a way to know the size of a picture in perl. i have added a menu also. for the people who say why we need a webbrowser to display pictures, i say that the animated pictures are not displayed correctly by most images viewers , try this picture of an animated crocroach: http://img145.imageshack.us/my.php?image=cockroachzm9.gif only in a webbrowser it is displayed correctly. the modified program: use strict; use warnings; use Cwd; use Win32::GUI qw(WS_VISIBLE WS_VSCROLL WS_HSCROLL WS_CHILD WS_CLIPCHILDREN); use Win32::OLE; use Win32::GUI::AxWindow; sub CSIDL_DRIVES() {17} # Define the application menu my @menu_defn = ( "File" => "Folder", ">OpenFolder" => { -name => "OpenFolder", -onClick => \&OpenFolder} ); my $menu = Win32::GUI::Menu->new(@menu_defn); my $dir; my $OLEControl; my $pic; my $desk = Win32::GUI::GetDesktopWindow(); my $dw = Win32::GUI::Width($desk); my $dh = Win32::GUI::Height($desk); # main Window my $Window = new Win32::GUI::Window ( -title => "Win32::GUI::AxWindow and Win32::OLE", -pos => [0, 0], -size => [$dw, $dh], -name => "Window", -menu => $menu, -vscroll => 1, -hscroll => 1, ) or die "new Window"; # Create AxWindow my $Control = new Win32::GUI::AxWindow ( -parent => $Window, -name => "Control", -pos => [126, 0], -size => [400, 400], -control => "Shell.Explorer.2", -style => WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL, #choose the line below if you want a separate axwindow #-style => WS_VISIBLE | WS_VSCROLL | WS_HSCROLL, ) or die "new Control"; # Register Event $Control->RegisterEvent ("DocumentComplete", "DocumentComplete_Event" ); my $PicList = $Window->AddListbox( -name => "PicList", -top => 0, -left => 0, -width => 125, -height => 110, -addstyle => WS_VISIBLE | WS_VSCROLL, ); my $checkbox = $Window->AddCheckbox( -text => "", -name => "Checkbox1", -left => 3, -top => 150, -width => 30, -height => 30, ); #Show application window $Window->Show(); #Enter event loop Win32::GUI::Dialog(); #Hide windows on exit $Window->Hide(); undef $Window; exit(0); # Event handler sub DocumentComplete_Event { $OLEControl->{Document}->write($pic); # Write Html } sub PicList_Click { my $ListSelection = $PicList->SelectedItem(); my $selectedPic = $PicList->GetString($ListSelection); my $picture = $dir . '/' . $selectedPic; # Get Ole object $OLEControl = $Control->GetOLE(); $OLEControl->Navigate("about:Blank"); # Clear control if($checkbox->GetCheck() != 0 ) { $pic = "<html><body> $picture </body></html>"; } else{ $pic = "<html><body> $picture </body></html>"; } return 0; } sub OpenFolder { $dir = Win32::GUI::BrowseForFolder( -title => "Select a drive", #-folderonly => 1, #-includefiles => 1, -editbox => 0, -root => CSIDL_DRIVES, ); $PicList -> Reset(); #erase the contents of PicList #read the contents of the folder and assign it to @files opendir DH, $dir or die "Cannot open $dir: $!"; my @files = grep { ! -d } readdir DH; closedir DH; #choose only jpg or gif files my @picFiles = grep /.+\.jpg|gif/,@files; # work with @files foreach my $item (@picFiles) { $PicList->Add($item); } return 0; } # Main window event handler sub Window_Terminate { # Release all before destroy window undef $OLEControl; $Control->Release(); return -1; } sub Window_Resize { if (defined $Window) { my($width, $height) = ($Window->GetClientRect)[2..3]; $Control->Resize ($width, $height); } } __END__ Waldemar Biernacki wrote: > > Hello! > > Is it possible to use Firefox instead of IE in these ActiveX components? > > Waldemar > > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the > world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > 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/Firefox-instead-IE-tp18594576p18607954.html Sent from the perl-win32-gui-users mailing list archive at Nabble.com. |
From: Waldemar B. <wb...@sa...> - 2008-07-22 17:27:05
|
Hello! Is it possible to use Firefox instead of IE in these ActiveX components? Waldemar |
From: george p. <gla...@ya...> - 2008-07-22 06:59:22
|
hello i have a solution, using the Google.pl found in the win32 gui package we add in the main body: # Register Event $Control->RegisterEvent ("DocumentComplete", "DocumentComplete_Event" ); and add the following: # Event handler sub DocumentComplete_Event { $OLEControl->{Document}->write($pic); # Write Html } so we have a good animated Gifs viewer the program now is: use strict; use warnings; use Cwd; use Win32::GUI qw(WS_VSCROLL WS_VISIBLE); use Win32::OLE; use Win32::GUI::AxWindow; my $dir = getcwd; our $OLEControl; our $pic; # main Window my $Window = new Win32::GUI::Window ( -title => "Win32::GUI::AxWindow and Win32::OLE", -pos => [0, 0], -size => [620, 470], -name => "Window", ) or die "new Window"; # Create AxWindow our $Control = new Win32::GUI::AxWindow ( -parent => $Window, -name => "Control", -pos => [150, 0], -size => [400, 400], -control => "Shell.Explorer.2", ) or die "new Control"; # Register Event $Control->RegisterEvent ("DocumentComplete", "DocumentComplete_Event" ); my $PicList = $Window->AddListbox( -name => "PicList", -top => 0, -left => 0, -width => 125, -height => 110, -addstyle => WS_VISIBLE | 3 | WS_VSCROLL, ); opendir DH, $dir or die "Cannot open $dir: $!"; my @files = grep { ! -d } readdir DH; closedir DH; #choose only jpg or gif files my @picFiles = grep /.+\.jpg|gif/,@files; # work with @files foreach my $item (@picFiles) { $PicList->Add($item); } #Show application window $Window->Show(); #Enter event loop Win32::GUI::Dialog(); #Hide windows on exit $Window->Hide(); undef $Window; exit(0); # Event handler sub DocumentComplete_Event { $OLEControl->{Document}->write($pic); # Write Html } sub PicList_Click { my $ListSelection = $PicList->SelectedItem(); my $selectedPic = $PicList->GetString($ListSelection); my $picture = $dir . '/' . $selectedPic; # Get Ole object $OLEControl = $Control->GetOLE(); $OLEControl->Navigate("about:Blank"); # Clear control $pic = "<html><body><img src='$picture' /></body></html>"; return 0; } # Main window event handler sub Window_Terminate { # Release all before destroy window undef $OLEControl; $Control->Release(); return -1; } sub Window_Resize { if (defined $Window) { my($width, $height) = ($Window->GetClientRect)[2..3]; $Control->Resize ($width, $height); } } __END__ |
From: george p. <gla...@ya...> - 2008-07-21 08:45:34
|
i was inspired by an article "Sample Application to load Adobe Acrobat ActiveX control' by rpnoble in this forum to try using the webBrowser to display images especially the animated Gifs, since webbrowsers are efficient in this matter. the purpose of the following program is to display images using the webBrowser , it will add the names of images files in the current directory to a ListBox, the usage is as follows: 1- click on the button "initiate" to execute the lines: $OLEControl = $Control->GetOLE(); $OLEControl->Navigate("about:Blank"); 2- click on any item in the ListBox to display the image. every time you need to click an item you must first click on the Initiate button. why is this long route?? , because it is not working when i put those two lines inside the ListBox_Click sub, it is working only in the first click, not the second nor the third, also i have tried to simulate the physical click by calling the Button1_Click from inside the ListBox_Click without a success. what should i do to be able to omit the button. use strict; use warnings; use Cwd; use Win32::GUI qw(WS_VSCROLL WS_VISIBLE); use Win32::OLE; use Win32::GUI::AxWindow; my $dir = getcwd; our $OLEControl; # main Window my $Window = new Win32::GUI::Window ( -title => "Win32::GUI::AxWindow and Win32::OLE", -pos => [0, 0], -size => [620, 470], -name => "Window", ) or die "new Window"; # Create AxWindow our $Control = new Win32::GUI::AxWindow ( -parent => $Window, -name => "Control", -pos => [150, 0], -size => [400, 400], -control => "Shell.Explorer.2", ) or die "new Control"; my $PicList = $Window->AddListbox( -name => "PicList", -top => 0, -left => 0, -width => 125, -height => 110, -addstyle => WS_VISIBLE | 3 | WS_VSCROLL, ); #the button are for test only $Window->AddButton( -name => "initiate", -align => "left", -text => "Initiate", -left => 0, -top => 200, -width => 100, -height => 50, ); opendir DH, $dir or die "Cannot open $dir: $!"; my @files = grep { ! -d } readdir DH; closedir DH; #choose only jpg or gif files my @picFiles = grep /.+\.jpg|gif/,@files; # work with @files foreach my $item (@picFiles) { $PicList->Add($item); } #the following button just for test only sub initiate_Click { $OLEControl = $Control->GetOLE(); $OLEControl->Navigate("about:Blank"); # Clear control } #Show application window $Window->Show(); #Enter event loop Win32::GUI::Dialog(); #Hide windows on exit $Window->Hide(); undef $Window; exit(0); sub PicList_Click { my $ListSelection = $PicList->SelectedItem(); my $selectedPic = $PicList->GetString($ListSelection); my $picture = $dir . '/' . $selectedPic; #here is the supposed normal position of the initiation two line below # Get Ole object #$OLEControl = $Control->GetOLE(); #$OLEControl->Navigate("about:Blank"); # Clear control my $pic = "<html><body><img src='$picture' /></body></html>"; $OLEControl->{Document}->write($pic); # Write Html return 0; } # Main window event handler sub Window_Terminate { # Release all before destroy window undef $OLEControl; $Control->Release(); return -1; } sub Window_Resize { if (defined $Window) { my($width, $height) = ($Window->GetClientRect)[2..3]; $Control->Resize ($width, $height); } } __END__ |