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: Louis B. <lb...@li...> - 2001-07-02 13:56:25
|
It works but still gives an error when I exit using the exe version. Maybe= =20 I should give up on the exit thing and let people click on the windows X to= =20 exit. Louis At 03:41 PM 7/2/2001 +0200, Johan Lindstrom wrote: >Louis wrote: >>So are you saying something like this??? >-snip- > >More like: > >my $EventLoop =3D 1; >while ($EventLoop) { > #some code... > Win32::GUI::DoEvents() while Win32::GUI::PeekMessage(0,0,0); >} > >sub Exit_Click { $EventLoop =3D 0; } > > >Forget that Enable thing, it's cleaner with a dedicated variable. I just=20 >wanted to connect my solution to your existing code, I don't know what=20 >other stuff you were doing with the window's Enable status. > > >/J > >------ ---- --- -- -- -- - - - - - >Johan Lindstr=F6m Boss Casinos >Sourcerer jo...@ba... > http://www.bahnhof.se/~johanl/ >If the only tool you have is a hammer, >everything tends to look >like a nail > > >_______________________________________________ >Perl-Win32-GUI-Users mailing list >Per...@li... >http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users -- =A4=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0= =BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 =A4=B0`=B0Lightbridge, Inc =A4=B0`=B067 South Bedford St. =A4=B0`=B0Burlington MA 01832 =A4=B0`=B0781.359.4795 mailto:lb...@li... =A4=B0`=B0http://www.lightbridge.com =A4=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0= =BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 |
From: Johan L. <jo...@ba...> - 2001-07-02 13:41:26
|
Louis wrote: >So are you saying something like this??? -snip- More like: my $EventLoop = 1; while ($EventLoop) { #some code... Win32::GUI::DoEvents() while Win32::GUI::PeekMessage(0,0,0); } sub Exit_Click { $EventLoop = 0; } Forget that Enable thing, it's cleaner with a dedicated variable. I just wanted to connect my solution to your existing code, I don't know what other stuff you were doing with the window's Enable status. /J ------ ---- --- -- -- -- - - - - - Johan Lindström Boss Casinos Sourcerer jo...@ba... http://www.bahnhof.se/~johanl/ If the only tool you have is a hammer, everything tends to look like a nail |
From: Louis B. <lb...@li...> - 2001-07-02 12:43:36
|
So are you saying something like this??? $close=3D1; while (1) { some code... Win32::GUI::DoEvents() while Win32::GUI::PeekMessage(0,0,0); exit(0) if !$W->IsEnabled(); exit(0) if $W->Enable($close); } exit(0); sub Exit_Click {$close=3D0;} After I build the exe using perl2exe and click on exit it still gives me an= =20 error. Louis At 01:55 PM 7/2/2001 +0200, Johan Lindstrom wrote: >Louis wrote: >>sub Exit_Click {$W->PostQuitMessage(0);} >> >>Now I know that this sub is executing because I can put a print in it and= =20 >>I will see it on the console window. However, it is not quitting the=20 >>program. How do I do that??? > >Normally, you exit the Win32::GUI::Dialog event loop with the=20 >PostQuitMessage, or by returning -1 from an event handler (more common). > >But, you don't use the Dialog sub, you use your own main loop, using=20 >DoEvents. So it's up to you to keep track of when you should exit that=20 >loop using a flag of some sort. For example, you have > > exit(0) if !$W->IsEnabled(); > >So, the proper thing in this case would be to use the Enable() status of=20 >the window to indicate "keep on running". $W->Enable(0) in the menu or=20 >button event handler perhaps? > > >/J > >------ ---- --- -- -- -- - - - - - >Johan Lindstr=F6m Boss Casinos >Sourcerer jo...@ba... > http://www.bahnhof.se/~johanl/ >If the only tool you have is a hammer, >everything tends to look >like a nail > > >_______________________________________________ >Perl-Win32-GUI-Users mailing list >Per...@li... >http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users -- =A4=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0= =BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 =A4=B0`=B0Lightbridge, Inc =A4=B0`=B067 South Bedford St. =A4=B0`=B0Burlington MA 01832 =A4=B0`=B0781.359.4795 mailto:lb...@li... =A4=B0`=B0http://www.lightbridge.com =A4=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0= =BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 |
From: Johan L. <jo...@ba...> - 2001-07-02 11:55:44
|
Louis wrote: >sub Exit_Click {$W->PostQuitMessage(0);} > >Now I know that this sub is executing because I can put a print in it and >I will see it on the console window. However, it is not quitting the >program. How do I do that??? Normally, you exit the Win32::GUI::Dialog event loop with the PostQuitMessage, or by returning -1 from an event handler (more common). But, you don't use the Dialog sub, you use your own main loop, using DoEvents. So it's up to you to keep track of when you should exit that loop using a flag of some sort. For example, you have exit(0) if !$W->IsEnabled(); So, the proper thing in this case would be to use the Enable() status of the window to indicate "keep on running". $W->Enable(0) in the menu or button event handler perhaps? /J ------ ---- --- -- -- -- - - - - - Johan Lindström Boss Casinos Sourcerer jo...@ba... http://www.bahnhof.se/~johanl/ If the only tool you have is a hammer, everything tends to look like a nail |
From: Louis B. <lb...@li...> - 2001-07-02 11:29:41
|
I have written a nifty gui that I really like using the win32 gui=20 module. I really have to thank the person(S) who put this all together. On to my question... I would like to design a menu containing an exit routine but it is not=20 working. Currently I have this as my program loop while (1) { Some repetitive code.... Win32::GUI::DoEvents() while Win32::GUI::PeekMessage(0,0,0); exit(0) if !$W->IsEnabled(); } exit(0); And I have a quit button that exits with this code: sub Quitb_Click { exit(0); } Now this works great while it is a button. But when I try to make this=20 menu it does not work. Actually it does work, however; when I convert the= =20 program to an exe and then click on the exit menu I get an error. So reading a bit I figured that I need to change the menu to some thing=20 like this: sub Exit_Click {$W->PostQuitMessage(0);} Now I know that this sub is executing because I can put a print in it and I= =20 will see it on the console window. However, it is not quitting the=20 program. How do I do that??? Thanks, Louis -- =A4=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0= =BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 =A4=B0`=B0Lightbridge, Inc =A4=B0`=B067 South Bedford St. =A4=B0`=B0Burlington MA 01832 =A4=B0`=B0781.359.4795 mailto:lb...@li... =A4=B0`=B0http://www.lightbridge.com =A4=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0= =BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 |
From: Morbus I. <mo...@di...> - 2001-06-30 19:00:42
|
>What's wrong with > > system("start $url") > >Providing $url starts with "http://" the shell does the right thing (see the >ShellExeceute API -- which start fronts -- for details). In my tests, I've found that causes some problems. I don't know why - my work machine (a 233mhz slowpoke running W98) worked just fine, and opened up Mozilla, Opera and IE using the above code. Sometimes, the browser would open up a little slower than the API call, but that wasn't that big of a deal. Just now, I tried it on my home machine (a 450mhz Win98) running Internet Explorer and Opera, and my program would pause/freeze a good ten seconds after the command was executed, then IE would open, display the URL, and then the program would crash. Phooey. The one thing I do like about the 'start' trick as opposed to the API call is that the 'start' trick ALWAYS opens a new browser window - the API call will take over an existing browser window with the new URL, which can get annoying if someone is actively browsing somewhere else. >Note sure if this will work, but you may not have to change your >$SETTINGS->{user}->{browser_path} with the regex above. You should be >able to > >system(qq|"$SETTINGS->{user}->{browser_path} ", $url|); This worked nicely - thanks. -- ICQ: 2927491 / AOL: akaMorbus Yahoo: morbus_iff / Jabber: mo...@ja... mo...@di... / http://www.disobey.com/ |
From: Piske, H. <Har...@bo...> - 2001-06-30 01:35:43
|
And now for something completely different ... I haven't tried to redo any of what you describe, but my very first posting and, in fact, the reason for me to find and join this group in the first place, was observing that Arc and Circle (from the GUI::DC package) work OK on Win2k and don't do anything on Win98. I tend to suspect that Aldo does not work on 98 ... ;-) |
From: Glenn L. <Gle...@ne...> - 2001-06-30 01:22:42
|
Sorry to followup my own post, but here is a surprising symptom, and some thoughts on the matter. During the debugging session described below, I discovered some unexpected behavior that meant that each time I Resized my windows, I wound up with the size of the window from the previous attempt to resize. So I was delayed by one Resize. By the nature of the application, this wasn't a problem, as I don't actually Resize often, and usually the actual size stays the same. But I fixed it anyway, and then got a modified behavior from my windows. With the debugging code disabled, and a lot of stuff done while the window is not visible before calling Win32::GUI::Dialog, when my main window now "appears" for the first time, it is missing its menu. In its place is the leftovers from whatever is behind the menu; the menu doesn't get drawn, and the area where the menu should be doesn't get drawn! The really bizarre effect came into play when I attempted (on Win9x, this all works fine on NT, remember) to use the application. I clicked a button in my script that launched a program, and a menu got drawn on my window!!!! But the really, really strange part was that it was the menu from the program I launched (not written using perl or Win32::GUI), not the menu that should belong to the window. This makes me speculate that perhaps menus are handled in some bizarre global manner on Win9x, and that the sequence of things is very important, and that Win32::GUI gets it slightly wrong??? I have two windows in my application, and when I started playing with menus, I only added menus to the main window (so far), and not to the other window. But the sequence of events in my program is to initialize a junk window (which goes away, to avoid my main window being in the task bar), then to initialize the main window (with the junk window as a parent), then to discard the junk window, then to add all the widgets to the main window, then to resize and move it to where it belongs, to display it briefly, and then to hide and disable it while I initialize a dialog window, add lots of widgets to it, resize and move it, display it briefly, and then hide it. Then I enable the main window, show it, and call Win32::GUI::Dialog. However, in debugging, I was able to produce the same effect without even creating the dialog window, but otherwise following the same sequence. While I'm not ready to share this code with the world, if any one would like to look at it that has more Windows knowledge than I, I could share it with a few. The next time the window is moved or resized by the user to a different location or size, the window will redraw, repositioning everything as if the window never had a menu, which was the state I used to initially see due to the above mentioned unexpected resize behavior... thus making me think the menu had never shown up, when it fact it had, and then had been deleted (behind my back as far as I can tell), and everything moved up a few pixels (yes, it was blank at the bottom). So why is my menu disappearing? I suppose I could try putting it back, with AddMenu? I haven't found an example of that, does it work? But while that might work around the problem, I must still wonder what memory gets corrupted when the menu disappears, and what negative effects that might have on the stability of Win9x (since that isn't very stable in the first place, I don't want to make it worse with my program). === Original message === That was a good clue, Andrew, and I've done some more analysis. Indeed, if I throw in some $mw -> Show (), and some Win32::GUI::DoEvents () into my initialization routines, I get some extra interesting data. I'm not sure yet what all it means, or why it happens. Here's my added knowledge: Indeed, the menu shows up when initially created. Then I add a bunch of widgets, and it takes more space than my initial size. So I Resize and Move the window. This seems to work fine. Then I Hide and Disable the window, do lots of other setup (theoretically, none of it applies to the main window, but an alternate window gets fully initialized, displayed briefly, and then Hide and Disable. Then, eventually, back to the main window, and we Enable and Show it, and when we do, in the next of my debug Show calls, the menu doesn't get redrawn--the area where the menu should be is left with the desktop displayed there. That's kind of like a hole in the window. Then, because I'm afraid some user might have adjusted the toolbars to cover part of my window, I recheck that, to potentially change the postition. So I go through the motions of a Resize and Move again, and on the next Show after the Resize, the hole where the menu should have been gets filled in with the stuff that should be below the menu... i.e. that stuff gets "moved up", apparently because the menu is now gone. The real question is, Where, oh where did my menu go? Oh where, oh where can it be? I guess I'll be debugging by removing code until I can make the behavior disappear, if I can. Any clues would be appreciated. Andrew Kincaid wrote: > Using your exact code on a Windows 95B and a Windows 98SE machine running Activestate Perl v.5.6.1.626 and Win32::GUI 0.0.558, I added the following lines to the end of your code: > > $W = new Win32::GUI::Window( > -title => "Title Here", > -left => 100, > -top => 100, > -width => 400, > -height => 400, > -style => WS_OVERLAPPEDWINDOW, > -menu => $mmenu, > -name => "Window", > ); > $W->Show(); > Win32::GUI::Dialog(); > > and it ran fine. I also used -menu => $smenu and it worked fine as well. I'm not sure what to say unless you want to send more or all of your code. > > Andrew Kincaid > Lead PC Systems Specialist, IS&T > Georgia State University > aki...@gs... > > >>> Gle...@ne... 06/19/01 09:07PM >>> > Hi, > > Is there a difference between Win 9x and NT for putting a menu on a > window using Win32::GUI? > > I added a bunch of menus to my application, and they show up fine on NT, > but they don't appear at all on Win 98. In fact, at first they caused > perl to crash on Win 98... but upgrading to build 626 seems to have > cured the bad memory reference, but the menus don't appear. > > Curiously, the floating menu that I added to my NotifyIcon does appear > on Win98. > > Here's my menu definition, in case there is something obviously wrong > with it.... > > my $mmenu = new Win32::GUI::Menu ( > "&File" => "FileMenu", > ">New &Location" => "NewLoc", > ">New &ISP" => "NewISP", > ">New &Phone Number" => "NewNum", > ">-" => 0, > ">E&xit" => "ExitNow", > "&Edit" => "EditMenu", > ">Edit Selected &Location" => "EditLoc", > ">Edit Selected &ISP" => "EditISP", > ">Edit Selected &Phone Number" => "EditNum", > "&Options" => "OptMenu", > "&Dialing" => "DialMenu", > ">&Dial" => "DialNow", > ">&Hangup" => "HangupNow", > ">&Launch Email" => "LaunchNow", > "&Help" => "HelpMenu", > ">&Help Text" => "HelpNow", > ">&About" => "AboutNow", > ">-" => 0, > ">Show &Debug Window" => "DebugNow", > ); > > $smenu = new Win32::GUI::Menu ( > "&Dialing" => "sDialMenu", > ">&Dial" => "sDialNow", > ">&Hangup" => "sHangupNow", > ">&Launch Email" => "sLaunchNow", > ">-" => 0, > ">&Bring to Front" => "sForeground", > ); > > -- > Glenn > ===== > Due to the current economic situation, the light at the > end of the tunnel will be turned off until further notice. > > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users -- Glenn ===== Due to the current economic situation, the light at the end of the tunnel will be turned off until further notice. _______________________________________________ Perl-Win32-GUI-Users mailing list Per...@li... http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users |
From: Johan L. <jo...@ba...> - 2001-06-29 22:00:16
|
Stephan wrote: >As the header says, how do I know what's available? For example, the >ListView control has "singlesel", "hottrack", etc. Where are these documented? There are a few ways to answer this, none of them really good. a) In the docs. There are number of pod/html files included in the source distribution at SouceForge[1]. I don't know if they are included in the PPM module yet. The documentation is however incomplete. <plug> I have also included (and I hope that's ok, but it guess it is) the docs in The GUI Loft[2] for easy reference from within the program (with control sensitive help as well). </plug> b) In the sample apps included in the source distro. Few things beat learning by example. The examples are however incomplete. The upside: this is working code (mostly). c) In the GUI.xs file from the source distro. Search for an "-optionname" you already know and do some code walking. You'll figure it out. This is the source. It is complete :) d) The Win32 API docs[3]. When you find a [TBD] in the Win32::GUI docs, it's often possible to find stuff here which will help you along. It also contains basic information about a lot of Win32 stuff that is useful to know when you write Windows programs. Don't assume that you _don't_ need to know this. e) The GUI Loft[2] is pretty much feature complete when it comes to supported options. Check the Properties window for a selected control, but keep in mind that The GUI Loft controls sometimes support more properties than what's available as -options in Win32::GUI. /J [1] <http://sourceforge.net/projects/perl-win32-gui> [2] <http://www.bahnhof.se/~johanl/perl/Loft/> [3] <http://msdn.microsoft.com/library/default.asp?URL=/library/psdk/psdkref/catfunc_26m1.htm> ------ ---- --- -- -- -- - - - - - Johan Lindström Boss Casinos Sourcerer jo...@ba... http://www.bahnhof.se/~johanl/ If the only tool you have is a hammer, everything tends to look like a nail |
From: Gross, S. <sg...@lo...> - 2001-06-29 20:53:21
|
As the header says, how do I know what's available? For example, the ListView control has "singlesel", "hottrack", etc. Where are these documented? TIA. _______________________________________________________ Stephan Gross Loral Skynet 908-470-2388 sg...@lo... <mailto:sg...@lo...> |
From: Glenn L. <Gle...@ne...> - 2001-06-29 06:27:36
|
That was a good clue, Andrew, and I've done some more analysis. Indeed, if I throw in some $mw -> Show (), and some Win32::GUI::DoEvents () into my initialization routines, I get some extra interesting data. I'm not sure yet what all it means, or why it happens. Here's my added knowledge: Indeed, the menu shows up when initially created. Then I add a bunch of widgets, and it takes more space than my initial size. So I Resize and Move the window. This seems to work fine. Then I Hide and Disable the window, do lots of other setup (theoretically, none of it applies to the main window, but an alternate window gets fully initialized, displayed briefly, and then Hide and Disable. Then, eventually, back to the main window, and we Enable and Show it, and when we do, in the next of my debug Show calls, the menu doesn't get redrawn--the area where the menu should be is left with the desktop displayed there. That's kind of like a hole in the window. Then, because I'm afraid some user might have adjusted the toolbars to cover part of my window, I recheck that, to potentially change the postition. So I go through the motions of a Resize and Move again, and on the next Show after the Resize, the hole where the menu should have been gets filled in with the stuff that should be below the menu... i.e. that stuff gets "moved up", apparently because the menu is now gone. The real question is, Where, oh where did my menu go? Oh where, oh where can it be? I guess I'll be debugging by removing code until I can make the behavior disappear, if I can. Any clues would be appreciated. Andrew Kincaid wrote: > Using your exact code on a Windows 95B and a Windows 98SE machine running Activestate Perl v.5.6.1.626 and Win32::GUI 0.0.558, I added the following lines to the end of your code: > > $W = new Win32::GUI::Window( > -title => "Title Here", > -left => 100, > -top => 100, > -width => 400, > -height => 400, > -style => WS_OVERLAPPEDWINDOW, > -menu => $mmenu, > -name => "Window", > ); > $W->Show(); > Win32::GUI::Dialog(); > > and it ran fine. I also used -menu => $smenu and it worked fine as well. I'm not sure what to say unless you want to send more or all of your code. > > Andrew Kincaid > Lead PC Systems Specialist, IS&T > Georgia State University > aki...@gs... > > >>> Gle...@ne... 06/19/01 09:07PM >>> > Hi, > > Is there a difference between Win 9x and NT for putting a menu on a > window using Win32::GUI? > > I added a bunch of menus to my application, and they show up fine on NT, > but they don't appear at all on Win 98. In fact, at first they caused > perl to crash on Win 98... but upgrading to build 626 seems to have > cured the bad memory reference, but the menus don't appear. > > Curiously, the floating menu that I added to my NotifyIcon does appear > on Win98. > > Here's my menu definition, in case there is something obviously wrong > with it.... > > my $mmenu = new Win32::GUI::Menu ( > "&File" => "FileMenu", > ">New &Location" => "NewLoc", > ">New &ISP" => "NewISP", > ">New &Phone Number" => "NewNum", > ">-" => 0, > ">E&xit" => "ExitNow", > "&Edit" => "EditMenu", > ">Edit Selected &Location" => "EditLoc", > ">Edit Selected &ISP" => "EditISP", > ">Edit Selected &Phone Number" => "EditNum", > "&Options" => "OptMenu", > "&Dialing" => "DialMenu", > ">&Dial" => "DialNow", > ">&Hangup" => "HangupNow", > ">&Launch Email" => "LaunchNow", > "&Help" => "HelpMenu", > ">&Help Text" => "HelpNow", > ">&About" => "AboutNow", > ">-" => 0, > ">Show &Debug Window" => "DebugNow", > ); > > $smenu = new Win32::GUI::Menu ( > "&Dialing" => "sDialMenu", > ">&Dial" => "sDialNow", > ">&Hangup" => "sHangupNow", > ">&Launch Email" => "sLaunchNow", > ">-" => 0, > ">&Bring to Front" => "sForeground", > ); > > -- > Glenn > ===== > Due to the current economic situation, the light at the > end of the tunnel will be turned off until further notice. > > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users -- Glenn ===== Due to the current economic situation, the light at the end of the tunnel will be turned off until further notice. |
From: Frazier, J. J. <Joe...@Pe...> - 2001-06-28 23:03:15
|
> -----Original Message----- > From: Morbus Iff [mailto:mo...@di...] > Sent: Thursday, June 28, 2001 17:38 > To: per...@li...; ge...@bi...; > per...@li... > Subject: [perl-win32-gui-users] RE: Opera and "Open Default Browser", > Hard Crash? >=20 >=20 > This is eventually the code I went with, which has > been tested with IE 5/6, Mozilla/Netscape, and Opera. >=20 > ############################################################## > ################=20 > open_url() - open a url in the system's default=20 > browser=20 > ############################################################## > ################=20 > USAGE:=20 > # &open_url( "http://127.0.0.1:8888/" ); =20 > # > # OS SPECIFIC=20 > NOTES: =20 > # This=20 > routine loads the Win32::Shell module to execute the=20 > "open" # command which will open the browser and=20 > load the URL.=20 > However, if the # user has defined a local path to a=20 > browser, we try=20 > to open that instead. # > #=20 > RETURNS:=20 > # 1; we instruct the user to open their browser if we=20 > can't.=20 > ############################################################## > ############### > sub open_url { >=20 > my ($url) =3D @_; >=20 > # we spit out our suggestion just to catch all instances. > ¬e("If your browser doesn't load, go to <$url>", 1); >=20 > # find out what browser we're using. > use Win32::TieRegistry; > my $browser =3D=20 > $Registry->{"Classes\\http\\shell\\open\\command"}->{'\\'}; > ¬e("Your registry states that $browser is your default=20 > program."); >=20 > # if a browser_path hasn't been set, try > # to open the default browser using the native API. > # note, that if the $browser is Opera, we skip > # this part, because Opera uses a Multiple > # Document Interface that crashes us every time. > # instead, we use the "path to browser" code below. > if ( $SETTINGS->{user}->{browser_path} eq "default" > or $browser =3D~ /opera/i ) { > use Win32::API; > my $ShellExecute =3D new Win32::API("shell32", "ShellExecuteA", > ['N','P', 'P', 'P', 'P', 'I'], 'N'); > $ShellExecute->Call(0, "open", $url, 0, 0, 1); > } >=20 > # if a browser_path has been defined, try passing > # the $url to the .exe and hope it understands. > else { >=20 > # if we see "program files" or "internet explorer", we take > # a chance and try to change them to their common eight char > # equivalents. this won't work for all users but covers > # a good large portion of them. yup yup. fun. chicks on speed. > $SETTINGS->{user}->{browser_path} =3D~ s/program=20 > files/progra~1/ig; > $SETTINGS->{user}->{browser_path} =3D~ s/internet=20 > explorer/intern~1/ig; >=20 > ¬e("Trying to load $SETTINGS->{user}->{browser_path}."); > unless ( fork ) {=20 > system("$SETTINGS->{user}->{browser_path} $url"); } > } Note sure if this will work, but you may not have to change your $SETTINGS->{user}->{browser_path} with the regex above. You should be able to=20 system(qq|"$SETTINGS->{user}->{browser_path} ", $url|); Basically, you want something on the command line like=20 c:\some path with spaces\exe.exe argument1 to be=20 "c:\some path with spaces\exe.exe" argument1 This way you dont have to munge the data. Also, if they installed to a path with spaces instead of defaults, if you can get this working, it takes care of all instances.... Just a thought. >=20 > return 1; > } >=20 > 1; >=20 > -- > Morbus Iff ( .sig on other machine. ) > http://www.disobey.com/ && http://www.gamegrene.com/ > "where's there's a will, there's a morbus ready to collect!" >=20 >=20 > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users >=20 |
From: Morbus I. <mo...@di...> - 2001-06-28 21:36:13
|
This is eventually the code I went with, which has been tested with IE 5/6, Mozilla/Netscape, and Opera. ############################################################################## open_url() - open a url in the system's default browser ############################################################################## USAGE: # &open_url( "http://127.0.0.1:8888/" ); # # OS SPECIFIC NOTES: # This routine loads the Win32::Shell module to execute the "open" # command which will open the browser and load the URL. However, if the # user has defined a local path to a browser, we try to open that instead. # # RETURNS: # 1; we instruct the user to open their browser if we can't. ############################################################################# sub open_url { my ($url) = @_; # we spit out our suggestion just to catch all instances. ¬e("If your browser doesn't load, go to <$url>", 1); # find out what browser we're using. use Win32::TieRegistry; my $browser = $Registry->{"Classes\\http\\shell\\open\\command"}->{'\\'}; ¬e("Your registry states that $browser is your default program."); # if a browser_path hasn't been set, try # to open the default browser using the native API. # note, that if the $browser is Opera, we skip # this part, because Opera uses a Multiple # Document Interface that crashes us every time. # instead, we use the "path to browser" code below. if ( $SETTINGS->{user}->{browser_path} eq "default" or $browser =~ /opera/i ) { use Win32::API; my $ShellExecute = new Win32::API("shell32", "ShellExecuteA", ['N','P', 'P', 'P', 'P', 'I'], 'N'); $ShellExecute->Call(0, "open", $url, 0, 0, 1); } # if a browser_path has been defined, try passing # the $url to the .exe and hope it understands. else { # if we see "program files" or "internet explorer", we take # a chance and try to change them to their common eight char # equivalents. this won't work for all users but covers # a good large portion of them. yup yup. fun. chicks on speed. $SETTINGS->{user}->{browser_path} =~ s/program files/progra~1/ig; $SETTINGS->{user}->{browser_path} =~ s/internet explorer/intern~1/ig; ¬e("Trying to load $SETTINGS->{user}->{browser_path}."); unless ( fork ) { system("$SETTINGS->{user}->{browser_path} $url"); } } return 1; } 1; -- Morbus Iff ( .sig on other machine. ) http://www.disobey.com/ && http://www.gamegrene.com/ "where's there's a will, there's a morbus ready to collect!" |
From: Johan L. <jo...@ba...> - 2001-06-28 16:33:44
|
Morbus wrote: > system("c:\progra~1\opera\opera.exe $url"); Does this do what you want? system("start $url"); Even system("$url"); should work. This all assumes that $url contains a file with a file extension which is mapped to an application on your system. But .html files should work in, like, 99.23 percent of all cases. And if someone screwed up their system, let that remain their problem :) /J ------ ---- --- -- -- -- - - - - - Johan Lindström Boss Casinos Sourcerer jo...@ba... http://www.bahnhof.se/~johanl/ If the only tool you have is a hammer, everything tends to look like a nail |
From: Morbus I. <mo...@di...> - 2001-06-28 15:47:51
|
I'm getting hard crashes when I use a registry check against the default browser. The program will request the default browser (in this case, Opera), open the browser correctly, and display the page. Mozilla/Netscape/IE work fine, but in the case of Opera, I get a infinitely repeatable crash as soon as the page is done loading. I've traced the bug to something within the Windows registry. A description and workaround is below. a) Downloaded Opera 5.12 for Windows. b) Opened it up, set it as the default browser. That was the only configuration change. c) Ran my program using the following code: use Win32::API; my $ShellExecute = new Win32::API("shell32", "ShellExecuteA", ['N','P', 'P', 'P', 'P', 'I'], 'N'); $ShellExecute->Call(0, "open", $url, 0, 0, 1); d) Opera opened up, displayed the main page, and program crashes. Ok. Hmf. c) Ran my program using the following code: system("c:\progra~1\opera\opera.exe $url"); Opera opened up, displayed the main page, and birds sing. The question is: why? And is there a workaround? Does the $ShellExecute call return the path to the browser? Can I do something like: use Win32::API; my $ShellExecute = new Win32::API("shell32", "ShellExecuteA", ['N','P', 'P', 'P', 'P', 'I'], 'N'); # pseudo code below if ($ShellExecute->Path =~ /Opera/i) { system("$ShellExecute->Path $url"); } else { $ShellExecute->Call(0, "open", $url, 0, 0, 1); } Is something like that possible? -- Morbus Iff ( .sig on other machine. ) http://www.disobey.com/ && http://www.gamegrene.com/ "where's there's a will, there's a morbus ready to collect!" |
From: Louis B. <lb...@li...> - 2001-06-28 12:09:52
|
Don't I feel stupid... I stumbled upon the solution to both questions... I= =20 needed to move my textfields outside of the while loop. Then I could use=20 selectall and replacesel to update the fields. Now it looks good. Louis At 07:03 AM 6/28/2001 -0400, you wrote: >I am running the attached code on my win2k machine and I am seeing two=20 >strange things. > >1. When the window updates the Textfields flicker and the data in them=20 >flicker. Is there anyway to get rid of that??? >2. When I update the numbers in the Textfields I have noticed that windows= =20 >keeps a memory of their previous values. When the above flicker happens I= =20 >see the previous value for a brief micro second. It is most annoying. Is= =20 >there any way I can fix that. > >In both cases I do want to keep the refresh time very low (less then 5=20 >seconds). > >Thanks, >Louis > > >use Win32::GUI; >use Net::FTP; > >foreach (@ARGV) >{ > $UserInfo[$i]=3D$_; > $i++; >} > >&usage if $i<3; > >############################### ># Variables >############################### >$FTPServer =3D $UserInfo[0]; >$FTPUser =3D $UserInfo[1];; >$FTPPasswd =3D $UserInfo[2];; >$FTPUsersDir =3D "/tmp"; >$FTPUsersTmpFile =3D "listevents.out"; >$UsersFile =3D "c:\\temp\\listevents.out"; >############################### > > >$W =3D new Win32::GUI::Window( > -title =3D> "Win32::GUI::Louis Test", > -left =3D> 100, > -top =3D> 100, > -width =3D> 225, > -height =3D> 200, > -font =3D> $F, > -name =3D> "MainWindow", >); > >$tX =3D 5; >$W->AddLabel( > -name =3D> "Processed_Label", > -text =3D> "Processed:", > -left =3D> $tX, > -top =3D> $tX, >); > >$tYp =3D $W->Processed_Label->Height + 20 +$tX; >$W->AddLabel( > -name =3D> "Queued_Label", > -text =3D> "Queued:", > -left =3D> $tX, > -top =3D> $tYp, >); > >$tYq =3D $W->Queued_Label->Height + 20 + $tYp; >$W->AddLabel( > -name =3D> "Waiting_Label", > -text =3D> "Waiting:", > -left =3D> $tX, > -top =3D> $tYq, >); > >$tYw =3D $W->Waiting_Label->Height + 20 + $tYq; >$W->AddLabel( > -name =3D> "ParsingFailed_Label", > -text =3D> "ParsingFailed:", > -left =3D> $tX, > -top =3D> $tYw, >); > >$tYpf =3D $W->ParsingFailed_Label->Height + 20 +$tYw; >$W->AddLabel( > -name =3D> "Repository_Label", > -text =3D> "Repository:", > -left =3D> $tX, > -top =3D> $tYpf, >); > >$sb =3D $W->AddStatusBar( > -name =3D> "Status", > -text =3D> "Event Server Running ", >); > > >$tX_Processed +=3D $W->Processed_Label->Width + 27; >$tX_Queued +=3D $W->Queued_Label->Width + 39; >$tX_Waiting +=3D $W->Waiting_Label->Width + 41; >$tX_ParsingFailed +=3D $W->ParsingFailed_Label->Width + 14; >$tX_Repository +=3D $W->Repository_Label->Width + 27; >############################################ >############################################ ># Process events to the window >############################################ >############################################ >$W->Show; >while (1) >{ > $ftp=3DNet::FTP->new($FTPServer)|| die "FTP Users failed\n"; > $ftp->login($FTPUser,$FTPPasswd)|| die "FTP login Users failed\n"; > $ftp->cwd($FTPUsersDir) || die "FTP cd UsersFailed\n"; > $ftp->get($FTPUsersTmpFile, $UsersFile)|| die "FTP get=20 > $FTPUsersTmpFile Failed $!\n"; > $ftp->quit; > > open(File, "c:\\temp\\listevents.out")||die; > while(<File>) > { > @Data=3D""; > chomp; > next if (! $_); > @Data=3Dsplit(/-/,$_); > } > > $W->AddTextfield( > -name =3D> "Processed_Text", > -left =3D> $tX_Processed, > -top =3D> $tX, > -width =3D> 80, > -height =3D> 20, > -text =3D> $Data[1], > ); > > $W->AddTextfield( > -name =3D> "Queued_Text", > -left =3D> $tX_Queued, > -top =3D> $tYp, > -width =3D> 80, > -height =3D> 20, > -text =3D> $Data[2] > ); > $W->AddTextfield( > -name =3D> "Waiting_Text", > -left =3D> $tX_Waiting, > -top =3D> $tYq, > -width =3D> 80, > -height =3D> 20, > -text =3D> $Data[0], > ); > $W->AddTextfield( > -name =3D> "ParsingFailed_Text", > -left =3D> $tX_ParsingFailed, > -top =3D> $tYw, > -width =3D> 80, > -height =3D> 20, > -text =3D> $Data[3], > ); > $W->AddTextfield( > -name =3D> "Repository_Text", > -left =3D> $tX_Repository, > -top =3D> $tYpf, > -width =3D> 80, > -height =3D> 20, > -text =3D> $Data[4], > ); > > $sb->Text("EventSvr $Data[5] $Data[6]"); > > Win32::GUI::PeekMessage(0,0,0); > Win32::GUI::DoEvents() < 0; > exit(0) if !$W->IsEnabled(); > sleep(1); > >} > >############################################ >############################################ ># Subrouteens to run >############################################ >############################################ > >sub MainWindow_Terminate {-1;print "";} > >sub usage >{ >} > >-- >=A4=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0= =BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 >=A4=B0`=B0Lightbridge, Inc >=A4=B0`=B067 South Bedford St. >=A4=B0`=B0Burlington MA 01832 >=A4=B0`=B0781.359.4795 mailto:lb...@li... >=A4=B0`=B0http://www.lightbridge.com >=A4=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0= =BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 > > >_______________________________________________ >Perl-Win32-GUI-Users mailing list >Per...@li... >http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users -- =A4=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0= =BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 =A4=B0`=B0Lightbridge, Inc =A4=B0`=B067 South Bedford St. =A4=B0`=B0Burlington MA 01832 =A4=B0`=B0781.359.4795 mailto:lb...@li... =A4=B0`=B0http://www.lightbridge.com =A4=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0= =BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 |
From: Louis B. <lb...@li...> - 2001-06-28 11:03:58
|
I am running the attached code on my win2k machine and I am seeing two=20 strange things. 1. When the window updates the Textfields flicker and the data in them=20 flicker. Is there anyway to get rid of that??? 2. When I update the numbers in the Textfields I have noticed that windows= =20 keeps a memory of their previous values. When the above flicker happens I= =20 see the previous value for a brief micro second. It is most annoying. Is= =20 there any way I can fix that. In both cases I do want to keep the refresh time very low (less then 5=20 seconds). Thanks, Louis use Win32::GUI; use Net::FTP; foreach (@ARGV) { $UserInfo[$i]=3D$_; $i++; } &usage if $i<3; ############################### # Variables ############################### $FTPServer =3D $UserInfo[0]; $FTPUser =3D $UserInfo[1];; $FTPPasswd =3D $UserInfo[2];; $FTPUsersDir =3D "/tmp"; $FTPUsersTmpFile =3D "listevents.out"; $UsersFile =3D "c:\\temp\\listevents.out"; ############################### $W =3D new Win32::GUI::Window( -title =3D> "Win32::GUI::Louis Test", -left =3D> 100, -top =3D> 100, -width =3D> 225, -height =3D> 200, -font =3D> $F, -name =3D> "MainWindow", ); $tX =3D 5; $W->AddLabel( -name =3D> "Processed_Label", -text =3D> "Processed:", -left =3D> $tX, -top =3D> $tX, ); $tYp =3D $W->Processed_Label->Height + 20 +$tX; $W->AddLabel( -name =3D> "Queued_Label", -text =3D> "Queued:", -left =3D> $tX, -top =3D> $tYp, ); $tYq =3D $W->Queued_Label->Height + 20 + $tYp; $W->AddLabel( -name =3D> "Waiting_Label", -text =3D> "Waiting:", -left =3D> $tX, -top =3D> $tYq, ); $tYw =3D $W->Waiting_Label->Height + 20 + $tYq; $W->AddLabel( -name =3D> "ParsingFailed_Label", -text =3D> "ParsingFailed:", -left =3D> $tX, -top =3D> $tYw, ); $tYpf =3D $W->ParsingFailed_Label->Height + 20 +$tYw; $W->AddLabel( -name =3D> "Repository_Label", -text =3D> "Repository:", -left =3D> $tX, -top =3D> $tYpf, ); $sb =3D $W->AddStatusBar( -name =3D> "Status", -text =3D> "Event Server Running ", ); $tX_Processed +=3D $W->Processed_Label->Width + 27; $tX_Queued +=3D $W->Queued_Label->Width + 39; $tX_Waiting +=3D $W->Waiting_Label->Width + 41; $tX_ParsingFailed +=3D $W->ParsingFailed_Label->Width + 14; $tX_Repository +=3D $W->Repository_Label->Width + 27; ############################################ ############################################ # Process events to the window ############################################ ############################################ $W->Show; while (1) { $ftp=3DNet::FTP->new($FTPServer)|| die "FTP Users failed\n"; $ftp->login($FTPUser,$FTPPasswd)|| die "FTP login Users failed\n"; $ftp->cwd($FTPUsersDir) || die "FTP cd UsersFailed\n"; $ftp->get($FTPUsersTmpFile, $UsersFile)|| die "FTP get $FTPUsersTmpFile= =20 Failed $!\n"; $ftp->quit; open(File, "c:\\temp\\listevents.out")||die; while(<File>) { @Data=3D""; chomp; next if (! $_); @Data=3Dsplit(/-/,$_); } $W->AddTextfield( -name =3D> "Processed_Text", -left =3D> $tX_Processed, -top =3D> $tX, -width =3D> 80, -height =3D> 20, -text =3D> $Data[1], ); $W->AddTextfield( -name =3D> "Queued_Text", -left =3D> $tX_Queued, -top =3D> $tYp, -width =3D> 80, -height =3D> 20, -text =3D> $Data[2] ); $W->AddTextfield( -name =3D> "Waiting_Text", -left =3D> $tX_Waiting, -top =3D> $tYq, -width =3D> 80, -height =3D> 20, -text =3D> $Data[0], ); $W->AddTextfield( -name =3D> "ParsingFailed_Text", -left =3D> $tX_ParsingFailed, -top =3D> $tYw, -width =3D> 80, -height =3D> 20, -text =3D> $Data[3], ); $W->AddTextfield( -name =3D> "Repository_Text", -left =3D> $tX_Repository, -top =3D> $tYpf, -width =3D> 80, -height =3D> 20, -text =3D> $Data[4], ); $sb->Text("EventSvr $Data[5] $Data[6]"); Win32::GUI::PeekMessage(0,0,0); Win32::GUI::DoEvents() < 0; exit(0) if !$W->IsEnabled(); sleep(1); } ############################################ ############################################ # Subrouteens to run ############################################ ############################################ sub MainWindow_Terminate {-1;print "";} sub usage { } -- =A4=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0= =BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 =A4=B0`=B0Lightbridge, Inc =A4=B0`=B067 South Bedford St. =A4=B0`=B0Burlington MA 01832 =A4=B0`=B0781.359.4795 mailto:lb...@li... =A4=B0`=B0http://www.lightbridge.com =A4=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0= =BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 |
From: Jeremy B. <sco...@ya...> - 2001-06-27 20:48:25
|
Here's what I've done. I'm not sure that this is the *correct* way of creating the rebar but it seems to work for me. I copied it from the example code. It does use the -style flag but I'm not sure how to do it without setting that manually. Jeremy Blonde Win32::GUI::Rebar->new( $Window, -name => "Rebar", -pos => [ 0, 0 ], -size => [ 0, 0 ], ); my $toolbar = $Window->AddToolbar( $Window->Rebar, -name => "ToolBar", -style => 2048 + 8 + 4, ); $toolbar->SetBitmapSize(40,40); $toolbar->AddButtons( 6, 0, 1, 4, 0, 0, 1, 2, 4, 0, 1, 2, 3, 4, 0, 2, 3, 4, 4, 0, 3, 4, 5, 4, 0, 4, 5, 6, 4, 0, 5, ); $Window->Rebar->InsertBand( -minwidth => 50, -minheight => 50, -child => $toolbar, -bitmap => $BUTTONS, ); ----- Original Message ----- From: "Forhan, Michael" <Mic...@tr...> To: "'Andrew Kincaid'" <aki...@gs...> Cc: <per...@li...> Sent: Wednesday, June 27, 2001 1:21 PM Subject: RE: [perl-win32-gui-users] Rebar > Thank you for sending me the webpage, unfortunately it hasn't been much help > to me (I haven't been able to display the bar, or anything on it). I > originally was using: > http://velocity.activestate.com/code/cpan/w/wi/Win32-GUI.html > > to look up information for Win32::GUI, but I'm really looking for an example > that works, so I can see where my code is wrong. I apologize for not posting > my code, as I'm sure that would be helpful, but I am unable to do that at > this time. > > Thanks for all your time and effort, > -Mike > Mic...@tr... > > -----Original Message----- > From: Andrew Kincaid [mailto:aki...@gs...] > Sent: Wednesday, June 27, 2001 10:48 AM > To: Mic...@tr... > Subject: Re: [perl-win32-gui-users] Rebar > > > There is documentation included in the Win32::GUI 0.0.558 distribution on > Rebar. I have attached the Rebar.html out of that package in case you don't > have it. > > Andrew Kincaid > Lead PC Systems Specialist, IS&T > Georgia State University > aki...@gs... > > > >>> Mic...@tr... 06/27/01 10:54AM >>> > I have been looking for the window elements that are mobile in a window > (like the toolbars in IE, and MS Office Products), and have figured from the > description that what I want is a 'Rebar'. I've been having a tough time > getting this item to work, and was hoping that someone could post an > example, perhaps with a bit of information on how it works. Unfortunately, > the site I'm at currently has very limited internet access, (thank god I can > still reach CPAN & ActiveState! ) so it'd be best to include attachments , > rather than links (though links would probably also be good for people > browsing this list.) > > Thank you for all of your trouble :) > -Mike > Mic...@tr... > > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > > > > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |
From: Forhan, M. <Mic...@tr...> - 2001-06-27 20:20:28
|
Thank you for sending me the webpage, unfortunately it hasn't been much help to me (I haven't been able to display the bar, or anything on it). I originally was using: http://velocity.activestate.com/code/cpan/w/wi/Win32-GUI.html to look up information for Win32::GUI, but I'm really looking for an example that works, so I can see where my code is wrong. I apologize for not posting my code, as I'm sure that would be helpful, but I am unable to do that at this time. Thanks for all your time and effort, -Mike Mic...@tr... -----Original Message----- From: Andrew Kincaid [mailto:aki...@gs...] Sent: Wednesday, June 27, 2001 10:48 AM To: Mic...@tr... Subject: Re: [perl-win32-gui-users] Rebar There is documentation included in the Win32::GUI 0.0.558 distribution on Rebar. I have attached the Rebar.html out of that package in case you don't have it. Andrew Kincaid Lead PC Systems Specialist, IS&T Georgia State University aki...@gs... >>> Mic...@tr... 06/27/01 10:54AM >>> I have been looking for the window elements that are mobile in a window (like the toolbars in IE, and MS Office Products), and have figured from the description that what I want is a 'Rebar'. I've been having a tough time getting this item to work, and was hoping that someone could post an example, perhaps with a bit of information on how it works. Unfortunately, the site I'm at currently has very limited internet access, (thank god I can still reach CPAN & ActiveState! ) so it'd be best to include attachments , rather than links (though links would probably also be good for people browsing this list.) Thank you for all of your trouble :) -Mike Mic...@tr... _______________________________________________ Perl-Win32-GUI-Users mailing list Per...@li... http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users |
From: <dar...@la...> - 2001-06-27 16:30:10
|
Is it possible to redirect the output from a DOS box to RichEdit control or something similar, I cannot seem to find any doc on this. Regards The information in this e-mail and any attachments is confidential and may be legally privileged. It is intended solely for the addressee or addressees. If you are not an intended recipient, please delete the message and any attachments and notify the sender of misdelivery: any use or disclosure of the contents of either is unauthorised and may be unlawful. All liability for viruses is excluded to the fullest extent permitted by law. Any views expressed in this message are those of the individual sender, except where the sender states them, with requisite authority, to be those of a specific LAZARD company or partnership. |
From: Forhan, M. <Mic...@tr...> - 2001-06-27 15:39:21
|
I have been looking for the window elements that are mobile in a window (like the toolbars in IE, and MS Office Products), and have figured from the description that what I want is a 'Rebar'. I've been having a tough time getting this item to work, and was hoping that someone could post an example, perhaps with a bit of information on how it works. Unfortunately, the site I'm at currently has very limited internet access, (thank god I can still reach CPAN & ActiveState! ) so it'd be best to include attachments , rather than links (though links would probably also be good for people browsing this list.) Thank you for all of your trouble :) -Mike Mic...@tr... |
From: Andrew K. <aki...@gs...> - 2001-06-27 13:58:19
|
You can use either: sub W_Terminate {-1;} or sub Window_Terminate {1;} I admit I don't totally understand this since the documentation for = _Terminate() says: Sent when the window is closed. The event should return -1 to terminate the interaction and return control to the perl script; see Dialog() And the Win32::GUI tutorial says about Event Handlers: Event handlers should return one of three specific values:=20 1: Proceed, taking the default action defined for the event.=20 0: Proceed, but do not take the default action.=20 -1: Terminate the message loop.=20 I guess the second "version" is more correct since the Event Handler = should have the name of <window name>_<event name> despite the "should = return -1" in the documentation for _Terminate(); Andrew Kincaid Lead PC Systems Specialist, IS&T Georgia State University aki...@gs...=20 >>> lb...@li... 06/27/01 09:27AM >>> Thank you all. I found I had to add the following before the sleep to terminate the loop: exit(0) if !$W->IsEnabled(); And change my terminate sub to the following: sub Window_Terminate {-1;print "";} For some odd reason if I do not do a print the program will not=20 terminate. Anyone have any ideas why??? Thanks, Louis At 03:00 PM 6/27/2001 +0200, Johan Lindstrom wrote: >Louis wrote: >>$W =3D new Win32::GUI::Window( >> -title =3D> "Win32::GUI::Louis Test", >> -left =3D> 100, >> -top =3D> 100, >> -width =3D> 200, >> -height =3D> 150, >> -font =3D> $F, >> -name =3D> "Window", >>); > >Note the -name. > > >>sub W_Terminate {-1;} > >Note the name. You use the name of a variable you happened to assign = the=20 >the object to. All event handlers are named after the -name option. = This=20 >should work better: > >sub Window_Terminate {-1;} > >I often find that my event code never gets run and wonder why. Then I=20 >insert a little > > print "!"; > >in the handler sub and find that the event is never triggered at = all...=20 >Oops :/ It is almost always caused by a misspelling or misunderstanding= =20 >of the control name. > > >BTW, it may be a test thing, but "Window" is a lousy name for a lot of=20 >reasons, some actually important. I discuss this in The GUI Loft User = Manual: > ><http://www.bahnhof.se/~johanl/perl/Loft/manual.html#control%20names%20are= %20global> > > >/J > >------ ---- --- -- -- -- - - - - - >Johan Lindstr=F6m Boss Casinos >Sourcerer jo...@ba...=20 > http://www.bahnhof.se/~johanl/=20 >If the only tool you have is a hammer, >everything tends to look >like a nail > > >_______________________________________________ >Perl-Win32-GUI-Users mailing list >Per...@li...=20 >http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users=20 -- =A4=A4=BA=B0`=B0=BA=A4=F8, ,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA= =A4=F8, ,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 =A4=B0`=B0Lightbridge, Inc =A4=B0`=B067 South Bedford St. =A4=B0`=B0Burlington MA 01832 =A4=B0`=B0781.359.4795 mailto:lb...@li...=20 =A4=B0`=B0http://www.lightbridge.com=20 =A4=A4=BA=B0`=B0=BA=A4=F8, ,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA= =A4=F8, ,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 _______________________________________________ Perl-Win32-GUI-Users mailing list Per...@li...=20 http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users |
From: Johan L. <jo...@ba...> - 2001-06-27 13:40:52
|
Lous wrote: >And change my terminate sub to the following: > sub Window_Terminate {-1;print "";} > >For some odd reason if I do not do a print the program will not >terminate. Anyone have any ideas why??? Just a note: you don't return -1 anymore, you return true, since that's what print returns. C:\>perldoc -f print /J ------ ---- --- -- -- -- - - - - - Johan Lindström Boss Casinos Sourcerer jo...@ba... http://www.bahnhof.se/~johanl/ If the only tool you have is a hammer, everything tends to look like a nail |
From: Louis B. <lb...@li...> - 2001-06-27 13:35:11
|
Thank you all. I found I had to add the following before the sleep to terminate the loop: exit(0) if !$W->IsEnabled(); And change my terminate sub to the following: sub Window_Terminate {-1;print "";} For some odd reason if I do not do a print the program will not=20 terminate. Anyone have any ideas why??? Thanks, Louis At 03:00 PM 6/27/2001 +0200, Johan Lindstrom wrote: >Louis wrote: >>$W =3D new Win32::GUI::Window( >> -title =3D> "Win32::GUI::Louis Test", >> -left =3D> 100, >> -top =3D> 100, >> -width =3D> 200, >> -height =3D> 150, >> -font =3D> $F, >> -name =3D> "Window", >>); > >Note the -name. > > >>sub W_Terminate {-1;} > >Note the name. You use the name of a variable you happened to assign the=20 >the object to. All event handlers are named after the -name option. This=20 >should work better: > >sub Window_Terminate {-1;} > >I often find that my event code never gets run and wonder why. Then I=20 >insert a little > > print "!"; > >in the handler sub and find that the event is never triggered at all...=20 >Oops :/ It is almost always caused by a misspelling or misunderstanding=20 >of the control name. > > >BTW, it may be a test thing, but "Window" is a lousy name for a lot of=20 >reasons, some actually important. I discuss this in The GUI Loft User= Manual: > ><http://www.bahnhof.se/~johanl/perl/Loft/manual.html#control%20names%20are%= 20global> > > >/J > >------ ---- --- -- -- -- - - - - - >Johan Lindstr=F6m Boss Casinos >Sourcerer jo...@ba... > http://www.bahnhof.se/~johanl/ >If the only tool you have is a hammer, >everything tends to look >like a nail > > >_______________________________________________ >Perl-Win32-GUI-Users mailing list >Per...@li... >http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users -- =A4=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0= =BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 =A4=B0`=B0Lightbridge, Inc =A4=B0`=B067 South Bedford St. =A4=B0`=B0Burlington MA 01832 =A4=B0`=B0781.359.4795 mailto:lb...@li... =A4=B0`=B0http://www.lightbridge.com =A4=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0= =BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 |
From: Andrew K. <aki...@gs...> - 2001-06-27 13:08:40
|
Oppss, typo on the "last" example. Forgot the !. Should read: last if !$W->IsEnabled(); Andrew >>> aki...@gs... 06/27/01 09:02AM >>> When you click the X, you send a terminate to the "window" loop but your = for loop is still going since it doesn't know about the window being = terminated. I don't know if this is the best solution, but you could add: exit if !$W->IsEnabled(); just before the sleep (2) command. Therefore, when your window goes away, = your script will exit. If you just want to exit the for loop and continue = use: last if $W->IsEnabled(); Andrew Kincaid Lead PC Systems Specialist, IS&T Georgia State University aki...@gs...=20 >>> lb...@li... 06/27/01 08:34AM >>> Help please, I am trying get this program to completely terminate when I click on the = X=20 in the top right hand corner but it is not working. I have played = around=20 with a few different ways to use peekmessage and doevents with no luck. Can some one help me. I do not see anything in the archives like this. Thanks, Louis use Win32::GUI; $W =3D new Win32::GUI::Window( -title =3D> "Win32::GUI::Louis Test", -left =3D> 100, -top =3D> 100, -width =3D> 200, -height =3D> 150, -font =3D> $F, -name =3D> "Window", ); $tX =3D 5; $W->AddLabel( -name =3D> "Fatal_Label", -text =3D> "Fatal:", -left =3D> $tX, -top =3D> 5, ); $tX =3D 5; $tY +=3D $W->Fatal_Label->Height + 10; $W->AddLabel( -name =3D> "Warning_Label", -text =3D> "Warning:", -left =3D> $tX, -top =3D> $tY, ); $tX_Fatal +=3D $W->Fatal_Label->Width + 27; $tX_Warning +=3D $W->Warning_Label->Width + 10; $W->Show; for ($i =3D 0; $i <=3D10; $i++) { $W->AddTextfield( -name =3D> "Fatal_Text", -left =3D> $tX_Fatal, -top =3D> 5, -width =3D> 80, -height =3D> 20, -text =3D> $i, ); $W->AddTextfield( -name =3D> "Warning_Text", -left =3D> $tX_Warning, -top =3D> $tY, -width =3D> 80, -height =3D> 20, -text =3D> "test2", ); print "$i\n"; Win32::GUI::PeekMessage(0,0,0); Win32::GUI::DoEvents() < 0; sleep(2); } sub W_Terminate {-1;} -- =A4=A4=BA=B0`=B0=BA=A4=F8, ,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA= =A4=F8, ,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 =A4=B0`=B0Lightbridge, Inc =A4=B0`=B067 South Bedford St. =A4=B0`=B0Burlington MA 01832 =A4=B0`=B0781.359.4795 mailto:lb...@li...=20 =A4=B0`=B0http://www.lightbridge.com=20 =A4=A4=BA=B0`=B0=BA=A4=F8, ,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA= =A4=F8, ,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 _______________________________________________ Perl-Win32-GUI-Users mailing list Per...@li...=20 http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users=20 _______________________________________________ Perl-Win32-GUI-Users mailing list Per...@li...=20 http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users |