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: Eric H. <sir...@ho...> - 2002-08-09 16:27:23
|
Has anyone written a business application for order entry, inventory management, accounting? I would like to find one written in GUI Perl with source code so I can make any customizations I may need. Thanks!! Eric _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com |
From: Christian K. <uz...@un...> - 2002-08-09 15:45:30
|
Hi listers, I am not that familiar with windows GUI programming. So my questions might be stupid, but I hope someone could help me with answers... 1. I would like to create a timer that is initially disabled. As I understand the docu for Win32::GUI I have to set the elapse time of the timer to 0 to disable it. So I thought $Window = new Win32::GUI::Window(-name => 'Window',-height => 600, -width => 800); $MyTimer = $Window->AddTimer('MyTimer',0); should create a window with a initially disabled timer and that $MyTimer->Interval(0); would disable it later on. But I found that the timer executed my event subroutine sub MyTimer_Timer {...} very very often instead of being disabled. What am I doing wrong here? How can I (initially) disable a timer? Maybe it has to do with my system? I am using Win32::GUI version 0.0.558 under WinXp Home. 2. I would like to use the font object of Win32::GUI. I will need it to display Western Europe characters as well as other types of characters (like cyrillic). In the docu I found many options for this object, where I do not know what they mean or which values might be valid for them. Here are some of the options from the which I do not understand: -escapement -weight -charset (Okay, this is for character sets. Is their a special notation for this?) -outputprecision -clipprecision -family -quality -name (Has the -name to be equivalent to the name of a font which is installed on the computer?) -face And from the GetMetrics() mehtod: -ascent -descent -ileading -eleading -avgwidth -overhang -aspectx -aspecty -firstchar -lastchar -breakchar -flags Maybe there is somewhere a more detailed documentation about using of fonts which I could read? I am specially interested if -name has to be equivalent to the name of a font installed on my computer and which values are valid for the -charset option? Thanks for all your hints and advice in advanced. Regards, Christian *** Christian Kappler *** |
From: <ma...@mm...> - 2002-08-07 23:06:59
|
after some more testing......if i take out the -parent => $Window from the settings window then pressing alt+c (for &Close) will work. also the shortcuts will work if anything (apart from the window) has focus. so when the program starts if i put in $ListView->SetFocus() then when i press alt+s the settings window will open, and then if i put $Window->Settings->Setfocus() (the settings button) in Close_Click, when i press alt+s the settings window will come up again. mark (i think thats it) |
From: <ma...@mm...> - 2002-08-07 22:46:42
|
the same goes for buttons too. if i have a button with -text => " &Settings", then so long as the listview has focus, when i press alt+s the settings window will pop up. it doesn't work with child windows though. if i have an &Close button in the settings window then no matter what has focus, it won't close the window. but alt+f4 will close the settings window only (while the settings window is open and has focus). mark ma...@mm... Sent by: To: "Piske, Harald" per...@li...urc <Har...@bo...> eforge.net cc: per...@li... Subject: RE: [perl-win32-gui-users] why not 08/08/02 08:31 AM work? its not an accel table its just a gui::makemenu and theres no reference to the listview in it anywhere. i just thought i'd add this considering we were talking about accelerator tables not working. mark "Piske, Harald" <Harald.Piske@bowneg To: "'ma...@mm...'" <ma...@mm...>, lobal.com> ROB <Ro...@nb...> cc: 08/08/02 02:41 AM per...@li... Subject: RE: [perl-win32-gui-users] why not work? I never worked with accelerators, so this may be stupid, but did you connect the accel table to the listview? If so, can you try to hang it on the main window instead? -----Original Message----- From: ma...@mm... [mailto:ma...@mm...] Sent: Tuesday, August 06, 2002 20:19 To: ROB Cc: per...@li... Subject: Re: [perl-win32-gui-users] why not work? i have a program which is based around a listview that i put a menu in for, but the menu shortcut keys (alt+f for file etc) would only work if the listview had focus. wierd? ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Perl-Win32-GUI-Users mailing list Per...@li... https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users |
From: <ma...@mm...> - 2002-08-07 22:32:38
|
its not an accel table its just a gui::makemenu and theres no reference to the listview in it anywhere. i just thought i'd add this considering we were talking about accelerator tables not working. mark "Piske, Harald" <Harald.Piske@bowneg To: "'ma...@mm...'" <ma...@mm...>, lobal.com> ROB <Ro...@nb...> cc: 08/08/02 02:41 AM per...@li... Subject: RE: [perl-win32-gui-users] why not work? I never worked with accelerators, so this may be stupid, but did you connect the accel table to the listview? If so, can you try to hang it on the main window instead? -----Original Message----- From: ma...@mm... [mailto:ma...@mm...] Sent: Tuesday, August 06, 2002 20:19 To: ROB Cc: per...@li... Subject: Re: [perl-win32-gui-users] why not work? i have a program which is based around a listview that i put a menu in for, but the menu shortcut keys (alt+f for file etc) would only work if the listview had focus. wierd? |
From: Piske, H. <Har...@bo...> - 2002-08-07 16:44:54
|
I never worked with accelerators, so this may be stupid, but did you connect the accel table to the listview? If so, can you try to hang it on the main window instead? -----Original Message----- From: ma...@mm... [mailto:ma...@mm...] Sent: Tuesday, August 06, 2002 20:19 To: ROB Cc: per...@li... Subject: Re: [perl-win32-gui-users] why not work? i have a program which is based around a listview that i put a menu in for, but the menu shortcut keys (alt+f for file etc) would only work if the listview had focus. wierd? |
From: <ma...@mm...> - 2002-08-07 03:20:09
|
i have a program which is based around a listview that i put a menu in for, but the menu shortcut keys (alt+f for file etc) would only work if the listview had focus. wierd? |
From: Borus G. <gab...@fr...> - 2002-08-06 06:36:34
|
Hi All! Did somebody make some printing from Perl? It will be greate, when i can print a report. thanks regards Gabor |
From: Erick B. <er...@je...> - 2002-07-25 22:53:02
|
> I couldn't find an event that works so I wound up traversing the tree. The > click() event doesn't seem to be sent with a checkbox click in a tree > view. Thats what I had thought, too bad.. > Is that what you mean? Yeah, thats what I meant. If anyone else has any better ideas, please let me know. Erick > >Hi, > > > >Anyone have a work around for retrieving the NODE when it's corresponding > >checkbox has been clicked? > >Provided, of course, the TreeView was created with -checkbox => 1. > > > >Regards, > > > >[ erick ] > > > > > >------------------------------------------------------- > >This sf.net email is sponsored by: Jabber - The world's fastest growing > >real-time communications platform! Don't just IM. Build it in! > >http://www.jabber.com/osdn/xim > >_______________________________________________ > >Perl-Win32-GUI-Users mailing list > >Per...@li... > >https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users Regards, [ erick ] |
From: Erick B. <er...@je...> - 2002-07-24 22:49:59
|
Hi, Anyone have a work around for retrieving the NODE when it's corresponding checkbox has been clicked? Provided, of course, the TreeView was created with -checkbox => 1. Regards, [ erick ] |
From: Johan L. <jo...@ba...> - 2002-07-24 14:04:12
|
At 05:25 2002-07-24 -0800, Sean Healy wrote: >I don't know if anyone's ever heard of the Games::Worms module, but I'm >attempting to make a Win32::GUI viewer for it, and I'm having a few problems. Painting on the window control itself will only last until the window is repainted by Windows, so that's the wrong thing to do. What you do is put a Graphic control in your window, then you put the drawing code into the Paint event handler. It will get called each time Windows thinks it needs to be repainted. If you know you changed something you can force it to repaint the control by calling InvalidateRect(). You are responsible for painting the entire area yourself. >Third, I tried placing Win32::GUI::DoEvents in the sub that draws the worm >segments, but it never returns, so the script sits there forever. I'm not >sure if this is a Graphic problem or not, but I've never run into it before. Either the program main loop is handled by your game. In that case you need to call DoEvents as often as possible (from the draw sub sounds right if it gets called often by the game engine). Or the program main loop is handled by Win32::GUI. In that case I suggest you set up a Timer control and in the Timer event handler you call the game engine so it can run the game. /J -------- ------ ---- --- -- -- -- - - - - - Johan Lindström Sourcerer @ Boss Casinos jo...@ba... Latest bookmark: "Buffy the Vampire Slayer (BTVS), a recent teen..." http://www.verbatimmag.com/slayer1.html dmoz (1 of 2): /Arts/Literature/Journals |
From: Sean H. <jal...@ho...> - 2002-07-24 13:26:35
|
I don't know if anyone's ever heard of the Games::Worms module, but I'm attempting to make a Win32::GUI viewer for it, and I'm having a few problems. First, I can't get the DC::BackColor function to work. I've tried [0,0,0] and 0, but neither seems to work. Second, every so often the current picture disappears, resulting in a gray background again, and things pick up again where they left, but everything I've drawn before is just gone. I have a border around the graphic control, and it doesn't appear at first, but as soon as the first picture blanking occurs, the border appears. Third, I tried placing Win32::GUI::DoEvents in the sub that draws the worm segments, but it never returns, so the script sits there forever. I'm not sure if this is a Graphic problem or not, but I've never run into it before. I don't use _Paint, because the Worms calls a sub named draw, which I have to override in my class. I thought perhaps that was my problem, so I set up a _Paint sub that simply gets the DC and then validates, but it made no difference. If nobody recognizes these problems, I'll try to reproduce them in a standalone script, since probably nobody else has Games::Worms. _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx |
From: Piske, H. <Har...@bo...> - 2002-07-23 15:43:25
|
I haven't because I haven't ... I mean, I haven't come across this phenomenon because I haven't used my Win32-GUI apps on a terminal server. But I found that where I use graphical thingies, they also vanish by minimizing/maximising and if another window happens to fly by, it wipes them away and all that. What I do to get around that is use InvalidateRect on the window, e.g. $Main->InvalidateRect ($Main->GetClientRect (), 0); maybe you'd have to work Paint events by subclassing a DC object and all this stuff, and maybe you'll need to intercept GetFocus and BringToFront and that stuff to know when to fire InvalidateRect. And maybe it doesn't work for you at all :-$ Have fun, Harald -----Original Message----- From: Joseph H. Schwendt II [mailto:jh...@sc...] Sent: Monday, July 22, 2002 21:40 To: per...@li... Subject: [perl-win32-gui-users] Windows Terminal Server in Application mode Refresh problems Hello, I'm having an issue where my application runs just fine on a Windows 2000 Terminal Server via the WinXP RDP client from Microsoft when the server is in administration mode, but when the server is put into application mode, my application doesn't draw any controls in the window. In fact, the only way I can get elements to appear is to click on them. I have tried refreshing the display with no effect. Minimize/Maximize also doesn't work. The window itself appears, but the controls do not until they are used. Has anyone else seen such behavior? It's quite strange and it preventing my application's use on several servers. Thanks, Joe. --------------------------------------------- Joseph H. Schwendt II http://schwendt.com jh...@sc... ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Perl-Win32-GUI-Users mailing list Per...@li... https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users |
From: Joseph H. S. I. <jh...@sc...> - 2002-07-23 04:38:08
|
Hello, I'm having an issue where my application runs just fine on a Windows 2000 Terminal Server via the WinXP RDP client from Microsoft when the server is in administration mode, but when the server is put into application mode, my application doesn't draw any controls in the window. In fact, the only way I can get elements to appear is to click on them. I have tried refreshing the display with no effect. Minimize/Maximize also doesn't work. The window itself appears, but the controls do not until they are used. Has anyone else seen such behavior? It's quite strange and it preventing my application's use on several servers. Thanks, Joe. --------------------------------------------- Joseph H. Schwendt II http://schwendt.com jh...@sc... |
From: Andrea M. <mae...@fr...> - 2002-07-20 08:24:54
|
Michael Eddington wrote: > > I've been reading the archives of this list and seen a couple posts about > random crashes using DoEvents handler through a loop. > > Things look a tad different in this case. I have several apps that use > DoEvents w/o any problems. On this app it will run all day fine until I use > clipboard functions (cut & past) from a RichEdit control. Then in about > 5-10 min I'll get an Access Violation 0x0000044 or the like. Me too but the crash happens immediatly... my workaround is to avoid ctrl+c ... with a Class for the Richedit and key bid. sub Text_KeyPress { my($key) = @_; if ($key == 1) { #do something } elsif ($key == 3) { #ctrl+c #do something } return 1; } My workaround works only with 0.0502 but not with newest versions. -- $_=q,6;-16;-1;-8;0;7;-13;-12;-9;-3;13#4A75737420616E6F74686572,,($_,$b)= split?#?;@b=split?;?;map{$c.=$_,$d.=chr$b[$e++]+ord}split??,pack'H24',$b ;chop$d,print$c.chr(32).$d |
From: Michael E. <med...@ho...> - 2002-07-19 23:18:38
|
I've been reading the archives of this list and seen a couple posts about random crashes using DoEvents handler through a loop. Things look a tad different in this case. I have several apps that use DoEvents w/o any problems. On this app it will run all day fine until I use clipboard functions (cut & past) from a RichEdit control. Then in about 5-10 min I'll get an Access Violation 0x0000044 or the like. I've tried both the older 5xx series and also the new 6xx code. I've recompiled Win32::GUI with /Ox, no optimizations, ActiveState Perl at different versions as well. I'd really like to track this down or I'll have to move to wxPerl (sigh). mike _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx |
From: Michael E. <med...@ho...> - 2002-07-18 23:05:19
|
Been writing a number of little tools that make use of Win32::GUI. One of them uses the ::DoEvents call. I have seen a couple peeps post before about getting "random" crashes with this. I seem to be okay until coping the contents of a RichEdit control (Ctrl-C). Then about 5-10 min later the app dies with an AccessViolation 0x0000044 or 41, etc. I've run this program for 8+ hrs w/o a crash then 5 min after a cut n past... anyone run into anything like this? I'm using a Dialog window. I've tried both the older version of Win32::GUI and the new (0.0.6xx) version. Both have the same problem. Latest build of ActiveStates perl. mike _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx |
From: Scott W. <wi...@vo...> - 2002-07-16 21:29:08
|
Thanks for the responses I have gotten on this. I am now able to extract the handle and object reference I was looking for, but unfortunately I still can't set the background color I have been trying to set. when I define a Textfield, the -foreground sets the color of the entered text and -background sets the color of the textfield, but have no effect on the textfield prompt. Unless I am missing something, I am also unable to set the background color on the label control for the textfield prompt after I have defined the textfield. It occurred to me, though, that I am trying too hard at this. The simple answer I decided upon was to forget the -prompt option in Add_Textfield. I simply defined a separate label conrol (...setting the correct background color) and placed it in front of the textfield. If anyone has any other suggestions, that would be great, but this seems to work OK. thanks again, Scott Wildenberg >It dosnt seem like anyone has answered you yet, so here goes, > >1) define Textfield, or label colour. > -foreground =3D>[ 0, 0, 255] , > -background =3D>[0,255,0], > >0 to 255 red,green,blue > >2) you can get the handle with -handle eg > $handle=3D$winMain->lblname()->{-handle}); > >JohnR |
From: Rogers, J. <rog...@oc...> - 2002-07-15 13:09:53
|
Scott, It dosnt seem like anyone has answered you yet, so here goes, 1) define Textfield, or label colour. -foreground =3D>[ 0, 0, 255] , -background =3D>[0,255,0], 0 to 255 red,green,blue 2) you can get the handle with -handle eg $handle=3D$winMain->lblname()->{-handle}); JohnR From: Scott Wildenberg <wilden@vo...>=20 textfield prompt color =20 2002-07-10 07:14 =20 =20 =20 How would I set the background color for a textfield prompt label or = in a checkbox label? I can see how I might be able to set it if I could get = the handle for that label, but I can't figure out how I would do that = either. Is there a way to get the handle for a control that you have a name = for but that you don't have a reference for? ##############################################################=20 Disclaimer=20 If this e-mail has been sent to you in error, please notify=20 Oc=E9-Australia Limited immediately and delete this e-mail from=20 your system.=20 Any views expressed in this e-mail are those of the individual=20 sender and may not necessarily reflect the views of=20 Oc=E9-Australia Limited.=20 ############################################################## |
From: Straub, P. (Peter) <st...@op...> - 2002-07-15 08:21:49
|
Hi, Kevin and Scott thank you very much for your replies. It seems to be very hard to combine the IPC stuff with the GUI event model, at least with regard to the means Win32::GUI offers. Receiving user defined events seems to be the main problem because there is no suitable access to the main event loop that I am aware of. And I can't think of a sensible way to call PeekMessage in a second application (except from scattering calls all over the code). The solution I am going to use is a very ugly one: In both applications I set up a timer to trigger a timer event. This event is used to check for incoming messages in a file. Cheers, Peter |
From: Piske, H. <Har...@bo...> - 2002-07-14 07:52:11
|
<HTML> <HEAD> <title>Win32::GUI FAQ</title> </HEAD> <BODY> <H1>The Win32::GUI FAQ</H1> <PRE>Aldo Calpini, da...@pe... Erick Bourgeois, er...@je...=20 Felix Gaehler, fe...@fr... v0.3, August 20, 2001 </PRE> <P><EM>This is the "Frequently Asked Questions" for Perl Win32::GUI = module. The=20 questions and answers have been collected from the Win32::GUI-Users = mailing=20 list. </EM> <HR> <H1>General Questions</H1> <H2>What is Win32::GUI?</H2> <P>"Win32::GUI is a Win32-platform native graphical user interface = toolkit for=20 Perl. Basically, it's an XS implementation of most of the functions = found in=20 user32.dll and gdi32.dll, with an object oriented Perl interface and an = event-based dialog model that mimic the functionality of visual basic. = It was a=20 big fun for me to put it up, hope it will be a fun for you too :-)"</P> <H2>Where can I get Win32::GUI?</H2> <P>The creator and chief maintainer of the Win32::GUI module is Aldo = Calpini.=20 The module and pertinent information can be found at <A=20 href=3D"http://dada.perl.it/">http://dada.perl.it/</A>. <BR>"The module = is=20 actually in beta testing so be warned that syntax and behavior can = change with=20 future builds; and of course, that there are many incomplete parts, = sparse=20 documentation (you can browse here the work in progress), and generally = a lot of=20 things to do."=20 <P>Win32::GUI for ActiveState Perl 5.6 can be downloaded from the = ActiveState=20 Archive using PPM:=20 <PRE> ppm install Win32::GUI </PRE> <P>Documentation is available at=20 <PRE> <A = href=3D"http://dada.perl.it/gui_docs/gui.html">http://dada.perl.it/gui_d= ocs/gui.html</A> <A = href=3D"http://www.jeb.ca/howto/The_Win32-GUI_HOWTO.html">http://www.jeb= .ca/howto/The_Win32-GUI_HOWTO.html</A> </PRE> <H2>What about licensing?</H2> <P>If I develop a product in Perl with usage of the Win32::GUI module, = and I spread=20 (well lets assume for FREE) to the public.. Is it still under GNU = license or=20 do we have to pay the Win32::GUI team something ?=20 <P>"No, you don't have to pay anything. I'm not a lawyer and I don't = want to pay=20 a lawyer :-) Win32::GUI is released under the Artistic License, e.g. = you can=20 redistribute it under the same terms of Perl itself."=20 <HR> <H1>Frequent Problems</H1> <H2>Why does my window seem to freeze when my program is in a = loop?</H2> <P>I can help here. Put a call to DoEvents() inside the loop. This will = ensure=20 that all queued messages are processed before going on with the loop: <PRE> use strict; use Win32::GUI; my $main =3D Win32::GUI::Window->new( -name =3D> "Main", -title =3D> "Win32-GUI: Doevents-Demo", -left =3D> 100, -top =3D> 100, -width =3D> 600, -height =3D> 400, ); sub Main_Terminate() { print "Main window terminated\n"; return -1; } my $textfield =3D $main->AddTextfield( -name =3D> "Textfield", -text =3D> "have fun and more", -left =3D> 75, -top =3D> 150, -width =3D> 200, -height =3D> 40, -readonly =3D> 1, ); $main->Show(); $textfield->Text("Processing infile..."); open INFILE, "<infile.txt" or die "open infile error: = $!"; my $linenr =3D 0; foreach my $line (<INFILE>) { $linenr++; $textfield->Text("Processing line $linenr"); <B>Win32::GUI::DoEvents() >=3D 0 or die "Window was closed = during processing";</B> sleep 1; #body of the loop... } $textfield->Text("completed"); Win32::GUI::DoEvents(); sleep 1; #program continues... </PRE> <P>This will, of course, make your loop run slightly slower (almost = irrelevant=20 if there is no activity on the window). But there is the advantage = (other than=20 having the Textfield saying "Processing...") of being able to stop the = loop in=20 the middle by killing the window, or with a 'dedicated' stopbutton, for = example.=20 <H2>Can I use a window handle in more than one process?</H2> <P>If you run some lengthy processing like web page retrieval with LWP, = database=20 search, file processing etc., and you cannot call = $Window->DoEvents() within=20 that processing, your window will seem to freeze during your = processing. The=20 solution to that is, to do the processing in a separate Windows thread = or=20 process. ActivePerl 5.6 simulates the "fork" command using Windows = threads.=20 <P>"Well, from Windows point of view, it is a thread. From Perl's point = of view,=20 it is a process. The Perl interpreter is busily keeping the data = separate=20 between the two threads (I'm not sure I understand the complete = technique of the=20 magic that does that, but I'm sure it can be made to work because the = Perl=20 language doesn't expose "real" addresses (much))."=20 <P>"On the other hand, the (UNIX) model for "fork" is that the multiple = processes (threads on Perl for Windows) start off with identical=20 data/variables/file handles. And the Windows model for "windows" is = that the=20 windows are owned by a process (not a thread), and can be accessed by = any thread=20 that has the window handle. (And in fact, because Windows was developed = on DOS,=20 the windows are even a bit visible to other processes, but that doesn't = concern=20 us here.)"=20 <P>"By creating the Win32::GUI objects before forking, both the parent = and child=20 threads get copies (?) of the object variables. Because of the nature = of=20 Windows, the embedded Window handles inside both copies of the object = variables=20 are equally usable. Because of the (present) nature of Win32::GUI, = whereby most=20 of the parameter data is pumped into Win32 API parameters, and most of = the=20 return values are obtained by calling Win32 APIs to obtain it, I have = shown=20 experimentally that it is possible to use the Win32::GUI object = references from=20 both a parent and a child thread. Now it is important to remember that = Windows=20 only delivers window messages to the first thread of a program, so in = the Perl=20 "fork" environment, this gets translated to <B>only the parent process = of a=20 group of Perl-forked processes can successfully run = Win32::GUI::Dialog</B> (Yep,=20 I tried it the other way first, figuring that the parent could more = easily=20 monitor the child process for death, since fork returns the child pid, = and=20 waitpid works that way--but it just hung, and the windows never = appeared).=20 However, <B>the child can use the object references created by = Win32::GUI</B>=20 [before the fork] to access the "IsEnabled", "IsVisible" attributes of = the=20 window widgets, and they are dynamically updated (not cached in the = object). The=20 child can access the current selection from combo boxes. The child can = enable=20 and disable widgets, and the display gets updated appropriately. This = is quite=20 adequate for my application, which now can do its "long" operations in = the child=20 "process", and keep the GUI window "active" (except that certain parts = get=20 disabled during "long" operations)."=20 <H2>How can I use Win32::GUI functions in EVAL?</H2> <P>Yes, Win32::GUI supports things like these (it's really Perl that = supports it=20 :-), but you need to escape your window-handler variable $W:=20 <PRE> eval qq ( sub main::$subtxt { print "button clicked\n"; <B>\$W</B>->SimpleLabel->Text("Got a = click"); } ); $@ or die "Error in eval: $@"; $$$verify </PRE>...and always check for $@ after an eval!=20 <HR> <H1>Text Fields</H1> <H2>How can I get a vertical scrollbar in a textfield?</H2> Add these options when you create the textfield: <PRE> =20 -multiline =3D> 1 -autovscroll =3D> 1 </PRE>This should do the trick.=20 <H2>How can I get the selected portion of a textfield?</H2> <P>There is a Selection method that returns the start and end of the = selection.=20 Then you just make a substr on the Textfield content: <PRE> ($from, = $to) =3D $Textfield->Selection(); $var =3D substr($Textfield->Text, $from, $to-$from); </PRE> <H2>How can I get the _Change event from a RichEdit control?</H2> <P>"I'd like to share a solution to a problem that has been driving me = nuts for=20 a while. I changed a Textfield control to a RichEdit and it would not = give me=20 the _Change event. I dug in the GUI.xs and could find nothing wrong. I = finally=20 tracked it down to the eventmask being zero, which means that the = notification=20 messages don't come to the GUI message loop in the first place. The = workaround=20 is to do=20 <PRE> $MainWindow->myRichEditField->SendMessage (0x445, 0, 1); </PRE> <P>That sends EM_SETEVENTMASK (0x445) to the control with the = ENM_CHANGE bit=20 set. Hope that spares somebody else a headache."=20 <H2>How can I format text in a RichEdit control?</H2> <P>There is a SetCharFormat method to the RichEdit control. <PRE> $Rich->Select ($from_here, $to_there); $Rich->SetCharFormat (-color =3D> $flashy_pink) </PRE> To set the font at the beginning you can use: <PRE> my $Font =3D new Win32::GUI::Font( -name =3D> "Courier New",=20 -height =3D> 16, -bold =3D> 0, ); ### or the font/style of your choice... ### and then in your AddRichEdit use -font =3D> $Font </PRE> <HR> <H1>ListView</H1> <H2>How can I prevent the user from choosing more than one item in a=20 Listview?</H2>You can use the -singlesel option on the ListView to = achieve what=20 you want.=20 <H2>How can I display a popup menu within a ListView?</H2> <P>Here is an example how it can be done:=20 <PRE># define popup menu for listview my $PopupMenu =3D new Win32::GUI::Menu( "Item Properties" =3D> "ItemProp", ">&Properties" =3D> "ItemProperties", ); =20 # get right-click in listview sub DataView_RightClick { my($X, $Y) =3D Win32::GUI::GetCursorPos(); =20 $MainWindow->TrackPopupMenu($PopupMenu->{ItemProp},$X, $Y); } =20 # clicked on particular menu item in popup menu sub ItemProperties_Click { ## code you want to process; } </PRE> <HR> <H1>MessageBox</H1> <H2>What are the icon, button and modality values for MessageBox?</H2> <P>"I think these will work, I haven't tried them all.=20 <PRE>Settings =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D 0 - display only the OK button 1 - display OK and Cancel buttons 2 - display Abort, Retry, and Ignore buttons 3 - display Yes, No, and Cancel buttons 4 - display Yes and No buttons 5 - display Retry and Cancel buttons 16 - display Critical Message icon 32 - display Warning Query icon 48 - display Warning Message icon 64 - display Information Message icon 0 - set first button as default 256 - set second button as default 512 - set third button as default 768 - set fourth button as default =20 Return Values =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 1 - OK 2 - Cancel 3 - Abort 4 - Retry 5 - Ignore 6 - Yes 7 - No" </PRE> <HR> <H1>Cursors</H1> <H2>How can I change the cursor to an hourglass and back?</H2> <P>Basically, what you want is <PRE> Win32::GUI::SetCursor () </PRE> the tricky thing is to get the standard resource of the hourglass. Feel = free to use my perl module http://www.fairymails.com/perl/WinStRes.pm for = exactly this: (Notice: Win32::API must be installed) <PRE> Win32::GUI::SetCursor (WinCursor (WAIT)); # hourglass ... Win32::GUI::SetCursor (WinCursor ()); # ... and back </PRE> What this module does is <PRE> $LoadImage =3D new Win32::API ('user32', 'LoadImage', [N,N,I,I,I,I],N) or die 'can\'t find LoadImage function'; ... %cursors =3D ( 'NORMAL' =3D> 32512, 'IBEAM' =3D> 32513, 'WAIT' =3D> 32514, ... sub WinCursor { local $_ =3D $cursors{$_[0]} or $cursors{'NORMAL'}; return $LoadImage->Call (0, $_, 2, 0, 0, 0x8040); } </PRE> Example: <p>First download the module http://www.fairymails.com/perl/WinStRes.pm = and store it under the name 'WinStRes.pm' in the directory where you have your perl = program, or in the perl modules directory. Second, make sure Win32::API is installed, or install it using ppm. The perl program below now shows the hourglass cursor for two seconds = each time the button "search now" is clicked. <PRE> use strict; use Win32::GUI; #How to get the "wait cursor" resource. #Alternative 1, using the Win32::API module: use Win32::API; my $loadImage =3D new Win32::API ('user32', 'LoadImage', = ['N','N','I','I','I','I'],'N') or die 'cannot find LoadImage function'; my $waitCursor =3D $loadImage->Call(0, 32514, 2, 0, 0, 0x8040); #Alternative 2, using the WinStRes module (uses Win32::API) #use WinStRes; #download from = http://www.fairymails.com/perl/WinStRes.pm #my $waitCursor =3D WinCursor("WAIT"); my $main =3D Win32::GUI::Window->new( -name =3D> "Main", -title =3D> "Win32-GUI: Hourglass Cursor Demo", -left =3D> 100, -top =3D> 100, -width =3D> 600, -height =3D> 400, ); my $search =3D $main->AddButton( -name =3D> 'Search', -text =3D> 'search now',=20 -left =3D> 25, -top =3D> 25, ); sub Search_Click { print "Searching...";=20 <B>my $oldCursor =3D Win32::GUI::SetCursor($waitCursor); #show = hourglass ...</B> sleep 2; #do your search here print "done\n"; <B>Win32::GUI::SetCursor($oldCursor); #show previous arrow cursor = again</B> return 1; } sub Main_Terminate { print "Main Window terminated\n"; return -1; } $main->Show(); Win32::GUI::Dialog(); </PRE> <HR> <H1>Extensions to Win32::GUI</H1> <H2>Is there a spreadsheet (grid) look-a-like solution or = component?</H2> <P>"No, but I'm thinking about implementing one (just thinking for now = :-). "=20 <H2>Is there a inline webbrowser somewhere ? or a HTML or XML = parser?</H2> <P>"No, and I don't think I will try to implement one :-) You should = instead look at=20 Win32::OLE, to see if you can embed an InternetExplorer instance in a = window.=20 That said, it seems that RichEdit 3.0 (available in Windows 2000) has a = lot of=20 nice features, that I'll try to implement if time permits."=20 <p>So, I used the Win32:OLE example from Learning Perl on Win32:=20 <PRE> use Win32::OLE; my $browser =3D CreateObject OLE = "InternetExplorer.Application.1" || return 0; $browser->{'Visible'} =3D 1; $browser->Navigate("http://www.perlmonks.org/"); </PRE> This works fine, except I'm now forcing the user to use IE instead of = Netscape.=20 And it's possible (not likely I realize) that they don't even have IE. = So what happens then?=20 <p>To show an URL in the default browser of your PC, the Win32::Shell = helps. Win32::Shell can be downloaded from the Activestate archive using ppm. = It is not in CPAN at present (June 2001). <PRE> use Win32::Shell; $url =3D "http://www.perlmonks.org"; Win32::Shell::Execute("open", $url, undef, undef, = "SW_SHOWNORMAL"); </PRE> This starts the default browser opened to the correct URL, with no = delay, and no console window.=20 <H2>Is there support for JPG or common image formats like .PNG or = .GIF?</H2> Win32::GUI::DIBitmap add new reading/writing bitmap formats to = Win32::GUI and some images manipulations (Conversion, Screen capture, ...).<br> This package uses FreeImage 2.4.1, an open source image library = supporting all common bitmap formats (visit : <a = href=3D"http://www.6ixsoft.com/">http://www.6ixsoft.com/</a>). <p>Supports many formats, such as: <pre> Format Reading Writing Description. BMP Y Y Windows or OS/2 Bitmap ICO Y N Windows Icon JPEG Y Y JPEG - JFIF Compliant JNG Y N JPEG Network Graphics KOALA Y N C64 Koala Graphics IFF Y N IFF Interleaved Bitmap MNG Y N Multiple Network Graphics PBM Y Y Portable Bitmap (ASCII) PBMRAW Y Y Portable Bitmap (RAW) PCD Y N Kodak PhotoCD PCX Y N Zsoft Paintbrush PGM Y Y Portable Greymap (ASCII) PGMRAW Y Y Portable Greymap (RAW) PNG Y Y Portable Network Graphics PPM Y Y Portable Pixelmap (ASCII) PPMRAW Y Y Portable Pixelmap (RAW) RAS Y N Sun Raster Image TARGA Y N Truevision Targa TIFF Y Y Tagged Image File Format WBMP Y Y Wireless Bitmap PSD Y N Adobe Photoshop </pre> <h3>Current version : 0.03</h3> <p><a = href=3D"http://perso.club-internet.fr/rocherl/DIBitmap.html">DIBitmap</a= > : Win32::GUI::DIBitmap Docs<br> <a = href=3D"http://perso.club-internet.fr/rocherl/Win32-GUI-DIBitmap-SRC.zip= ">Win32-GUI-DIBitmap-SRC.zip (28 ko)</a> : Source Code and samples (You must download FreeImage = source code for build it, see Readme.txt)<br> <a = href=3D"http://perso.club-internet.fr/rocherl/Win32-GUI-DIBitmap-PPM-500= 5.zip">Win32-GUI-DIBitmap-PPM-5005.zip (266 ko)</a> : PPM distribution for Active Perl 5.003 (see = Readme) <br> <a = href=3D"http://perso.club-internet.fr/rocherl/Win32-GUI-DIBitmap-PPM-56.= zip">Win32-GUI-DIBitmap-PPM-56.zip (271 ko)</a> : PPM distribution for Active Perl 5.6 (see Readme) <p> For more information see <a = href=3D"http://perso.club-internet.fr/rocherl/Win32GUI.html">http://pers= o.club-internet.fr/rocherl/Win32GUI.html</a> (email from Laurent Rocher Aug 20, 2001)</p> <H2>How can I deal with moving and resizing stuff when a window is = resized?</H2> <P>"Dealing with moving and resizing stuff when a window is resized is = really=20 annoying, not to mention boring. So I created a class to make that = easier. That=20 was a lot more fun for some reason :) Anyway, the result is = Win32::GUI::Resizer.=20 <PRE> <A = href=3D"http://www.bahnhof.se/~johanl/perl/Win32GUI/">http://www.bahnhof= .se/~johanl/perl/Win32GUI/</A> </PRE>Please try it out if you like and let me know what you think. = " (email from Johan Lindstr=F6m, Sourcerer, Boss Casinos Ltd, Antigua,=20 jp...@bo...)=20 <H2>Is there a Win32-GUI-Builder available (i.e. a visual aid in = designing the=20 GUI)?</H2> <P>yes, well.. at least a basic one. Download=20 <PRE> <A = href=3D"ftp://ftp.wh.whoi.edu/pub/gb109.zip">ftp://ftp.wh.whoi.edu/pub/g= b109.zip</A></PRE> For more information, check the Win32::GUI mailing-list, the emails = from David Hiltz.=20 <p>Another one is the <b>GUI Loft</b> by Johan Lindstr=F6m. This is a = powerful and easy-to-use WYSIWYG editor for designing Win32::GUI windows, dialog boxes and toolwindows. It is = also a set of classes used=20 to create the window for you at runtime. <p> Download source and/or binaries here: <a = href=3D"http://www.bahnhof.se/~johanl/perl/Loft/"> http://www.bahnhof.se/~johanl/perl/Loft/</a> <p> The Perl Artistic License applies. <p> There is an extensive User Manual in the Help menu, please read it. But = try=20 the program first, you are programmers and power-users after all, = right? :) <p> Currently supported controls are: Window, DialogBox, ToolbarWindow, Button, Label, TextField, = RadioButton,=20 CheckBox, GroupBox, Listbox, RichEdit, ListView, ComboBox, TreeView,=20 TabStrip, Timer, ImageList <p> Cool features include: <p>- Pretty extensive WYSIWYG support + 100% accurate preview <p>- Pretty complete support for Win32::GUI control options--and then = some <p>- It's actually easy to use (IMHO :) <p>- Docs and demo code <p>- No-code runtime TabStrip management <HR> </BODY></HTML> |
From: Arvind L <arv...@ya...> - 2002-07-14 07:20:54
|
Hi All, i have installed Win32 GUI 0.0.558 on Win Nt through ppm. Perl version is 5.6.1 (MSWin32-x86-multi-thread). I tried this simple program to start with. #!E:/Dev/Perl/bin/perl use Win32::GUI; $main = Win32::GUI::Window->new( -name => 'Main', -width => 100, -height => 100, ); $main->AddLabel(-text => "Hello, world"); $main->Show(); Win32::GUI::Dialog(); sub Main_Terminate { -1; } This program generates an Windows application error. "The instruction at "0x......" referenced memory at "0x00000000". The memory could not be read. Could you wise folks out there please point out where the problem could be. Thanx in advance Regards Arvind __________________________________________________ Do You Yahoo!? Yahoo! Autos - Get free new car price quotes http://autos.yahoo.com |
From: Rogers, J. <rog...@oc...> - 2002-07-11 00:19:43
|
These two curious scripts below where posted on this list some time = ago, (there is no archive search sorry I dont know who) Its probably not quite what you wanted, but could be worth a play. #-------------sender.pl #!perl -w use strict; use Win32::GUI; my $hwind =3D &gethandle; #my $hwind =3D <STDIN>; print "hwind $hwind"; print "\nEnter text: "; my $text =3D <STDIN>; Win32::GUI::Text($hwind, $text); Win32::GUI::InvalidateRect($hwind, 1); #EOF sub gethandle{ my $winname=3D'Autoscroller'; my $desktop =3D GUI::GetDesktopWindow(); my $window =3D GUI::GetWindow($desktop, GW_CHILD); while($window) {my $title =3D GUI::Text($window); if($title eq "$winname"){print "found $winname\n"; =09 my $window2 =3D GUI::GetWindow($window, GW_CHILD); =09 $hwind=3D$window2; =09 } $window =3D GUI::GetWindow($window, GW_HWNDNEXT); } $hwind} ###end #------mainwindow.pl use strict; use Win32::GUI; my $winMain =3D new Win32::GUI::Window( -left =3D> 13, -top =3D> 32, -width =3D> 439, -height =3D> 260, -name =3D> "winMain", -text =3D> "Autoscroller", ); $winMain->AddLabel( -text =3D> "lblTest", -name =3D> "lblTest", -left =3D> 0, -top =3D> 0, -width =3D> 400, -height =3D> 250, ); $winMain->lblTest()->Text("The hwind is: " . $winMain->lblTest()->{-handle}); $winMain->Show(); Win32::GUI::Dialog(); ####finish =20 John Rogers System Engineer Oce Australia Ph 3212 8114=20 ##############################################################=20 Disclaimer=20 If this e-mail has been sent to you in error, please notify=20 Oc=E9-Australia Limited immediately and delete this e-mail from=20 your system.=20 Any views expressed in this e-mail are those of the individual=20 sender and may not necessarily reflect the views of=20 Oc=E9-Australia Limited.=20 ############################################################## |
From: Scott W. <wi...@vo...> - 2002-07-10 14:14:09
|
How would I set the background color for a textfield prompt label or in a checkbox label? I can see how I might be able to set it if I could get the handle for that label, but I can't figure out how I would do that either. Is there a way to get the handle for a control that you have a name for but that you don't have a reference for? Thanks much! Scott C. Wildenberg, Ph.D. University of Minnesota Dept. of Medicine-Genetics Infotech Specialist wi...@vo... Prove all things; hold fast that which is good. -- I Thes. 5:21 |
From: Rogers, J. <rog...@oc...> - 2002-07-10 00:51:08
|
Howdy, Ive used Class to set Icons and cursers. EG. $I =3D new Win32::GUI::Icon("icon.ico"); $C=3Dnew Win32::GUI::Bitmap("no.cur", 2); $WinClass =3D new Win32::GUI::Class( -name =3D> "johns-windows",=20 -cursor =3D> $C, -icon =3D> $I,); =09 Windows created with -class =3D> $WinClass will Have the same Icon and = curser > -----Original Message----- > From: Steven Swenson [mailto:ssw...@su...] > Sent: Wednesday, 10 July 2002 8:20 AM > To: per...@li... > Subject: [perl-win32-gui-users] Win32::GUI::Class() ?? >=20 >=20 > Hi all, > I was curious if anyone has any examples of how to use the=20 > Win32::GUI::Class function to create new class of windows? > Would this allow the use of new events? or combination of=20 > existing classes? >=20 > --Steve >=20 >=20 >=20 > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Stuff, things, and much much more. > http://thinkgeek.com/sf > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users >=20 ##############################################################=20 Disclaimer=20 If this e-mail has been sent to you in error, please notify=20 Oc=E9-Australia Limited immediately and delete this e-mail from=20 your system.=20 Any views expressed in this e-mail are those of the individual=20 sender and may not necessarily reflect the views of=20 Oc=E9-Australia Limited.=20 ############################################################## |