From: Chris W. <ch...@vi...> - 2004-11-15 15:25:09
|
I agree that the official documentation describing each control, it's methods and properties are each described in greater detail (especially the TDB ones), also a list of depreciated methods and their replacements. I also note that with each build or commit to CVS, Laurent has documented more and more of these... I know from personal experience that documentation is the least exciting part of any project. I feel, the people best placed to document the project, are those contributing the functionality to the source, however slow it creeps in. What we are tossing around here, is the idea of creating a collection of both small snippets of individual control syntax, and larger working examples for all to benefit from, and is somewhat outside of the official documentation. The list is full of questions from new users requesting an example of 'how do I add' or 'how do I make'. The question I originally started, was whether their was an existing facility or repository to easily add or post examples to, so that at least they could be under 'Control' headings and not scattered throughout 3 years of user list. I spend an equal amount of time using PHP and have found great benefit from the PHP documentation that also contains user contributed notes/snippets/examples after each command reference. I had originally thought something similar would be of great benefit to both new and seasoned users of Win32::GUI Chris Wearn -----Original Message----- From: per...@li... [mailto:per...@li...]On Behalf Of Frazier, Joe Jr Sent: Monday, 15 November 2004 08:56 To: Chris Wearn Cc: Win32-GUI List Subject: RE: [perl-win32-gui-users] Website - Code snippets gallery Chris, this is a good idea, but I personally would much prefer if someone to spend their time fleshing out the official documentation. Putting examples there would be the most appropriate place and there are still a lot of methods in there with "TDB". The main reason I bring this is up is that I have recently had to start really playing with Java for my work and the official Javadoc stuff is horribly lite on examples, (unlink most perl modules out there, which are usually fairly good). Joe Frazier, Jr. <editorial> A good example is the Date class. Many of the methods and constructors in this class are depreciated, and it points you to the Calendar Class or the DateFormat class. One would logically think that these two classes would be subclasses so that you can pass these to a method that takes a date, but no.... You have to convert to a date object explicitly. Stupid Java.... </editorial> > -----Original Message----- > From: per...@li... > [mailto:per...@li...] On > Behalf Of Chris Wearn > Sent: Monday, November 15, 2004 7:28 AM > To: Jez White > Cc: Win32-GUI List > Subject: RE: [perl-win32-gui-users] Website - Code snippets gallery > > Hiya Jez, > > I agree that a Win32::GUI cookbook would be a great idea, > available as a document that you can print out and read, > while being able to download an electronic copy, to enable > the 'cutting & pasting' of examples. > > To ease editing, add styles and colour coding, a MS Word > document would probably be the most common format. It can > then be read in Star Office, and a PDF version could also be output. > > I'm happy to do some assembly... and make a > 'work-in-progress' version available via a link on my domain. > > Once we have got to various stages we can commit it to CVS on > sourceforge. > > Unless someone else with a degree in publishing, a Mac with > Quark and nothing else to do, wishes to volunteer... > > Otherwise, start emailing me content/examples... > > Chris Wearn > > -----Original Message----- > From: Jez White [mailto:je...@je...] > Sent: Monday, 15 November 2004 06:59 > To: Glenn Linderman; Chris Wearn > Cc: Win32-GUI List > Subject: Re: [perl-win32-gui-users] Website - Code snippets gallery > > > >> There are many examples / small snippets of code that > could serve as > >> examples to others, we just need a place to easily store and > >> collectively showcase them. Something like a forum (I run > one using > >> phpBB). Is there any way of doing this on Sourceforge or > some other > >> place where people can paste in 'how to' snippets, or do we start > >> one. > > I too think we need a place for these snippets - a Win32::GUI > cookbook of sorts. It's a question of who is prepared to > maintain/organise it? Any offers? > > > It is always delightful when someone offers some of the hard-won > > fruits of their labors to share with others. Thanks for > thinking of it. > > > > This is probably a nice snippet of code... but it isn't complete > > enough to run, so I can't tell for sure. Probably adding a > few lines > > at the top to use strict; use warnings; use Win32::GUI; and to > > initialize the > > I've created an example, and have added to CVS - the code is > also below. The only thing you need to do is to have a bitmap > of some description - I was going to add a bitmap to CVS so > the script would run, but I don't think the world is ready > for my art skills:) > > Cheers, > > jez. > > ------------- > use Win32::GUI; > use strict; > > my ($width,$height); > my $mainwin; > > #try to load the splash bitmap from the exe that is running > my $splashimage= new Win32::GUI::Bitmap('SPLASH'); unless > ($splashimage) { > #bitmap is not in exe, load from file > $splashimage= new Win32::GUI::Bitmap('SPLASH.bmp'); > die 'could not find splash bitmap' unless $splashimage; > #get the dimensions of the bitmap > ($width,$height) = $splashimage->Info(); > } > > #create the splash window > my $splash = new Win32::GUI::Window ( > -name => "Splash", > -text => "Splash", > -height => $height, > -width => $width, > -left => 100, > -top => 100, > -addstyle => WS_POPUP, > -popstyle => WS_CAPTION | WS_THICKFRAME, > -addexstyle => WS_EX_TOPMOST > ); > > #create a label in which the bitmap will be placed > my $bitmap = $splash->AddLabel( > -name => "Bitmap", > -left => 0, > -top => 0, > -width => $width, > -height => $height, > -bitmap => $splashimage, > ); > $bitmap->SetImage( $splashimage ); > > #center the splash and show it > $splash->Center; > $splash->Show(); > #call do events - not Dialog - this will display the window > and let us #build the rest of the application. > Win32::GUI::DoEvents; > > #A good way of building your application is to keep > everything in packages, and eval those #into scope in this > phase. In this case, we'll create the main window and sleep > to simulate #some work. > my $string = q ` > $mainwin = new Win32::GUI::Window ( > -name => "Main", > -text => "Main window", > -height => 400, > -width => 400, > ); > sleep(2); > $mainwin->Center(); > $mainwin->Show(); > `; > #eval the code and report any errors > eval $string; > if ($@) { > my $message = $@; > Win32::GUI::MessageBox($splash, $message ,"Build Error", > MB_OK | MB_ICONWARNING); > } > #hide the splash and enter the Dialog phase $splash->Hide; > Win32::GUI::Dialog(); > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: InterSystems CACHE FREE > OODBMS DOWNLOAD - A multidimensional database that combines > robust object and relational technologies, making it a > perfect match for Java, C++,COM, XML, ODBC and JDBC. > www.intersystems.com/match8 > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > ------------------------------------------------------- This SF.Net email is sponsored by: InterSystems CACHE FREE OODBMS DOWNLOAD - A multidimensional database that combines robust object and relational technologies, making it a perfect match for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 _______________________________________________ Perl-Win32-GUI-Users mailing list Per...@li... https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users |
From: Alex L. <sim...@gm...> - 2004-11-23 07:10:33
|
Hi all: I think win32::gui cookbook is a great idea. Has anyone even think about trying to officially publish it. I don't mind putting out the money for self-publish I-universe type book and split the profit! ;) I can actually submit a few examples mysef. Please let me know if anyone is interested. al ;) On Mon, 15 Nov 2004 10:17:17 -0800, Glenn Linderman <pe...@ne...> wrote: > On approximately 11/15/2004 7:29 AM, came the following characters from > > > the keyboard of Chris Wearn: > > > I agree that the official documentation describing each control, it's > > methods and properties are each described in greater detail (especially the > > TDB ones), also a list of depreciated methods and their replacements. I also > > note that with each build or commit to CVS, Laurent has documented more and > > more of these... I know from personal experience that documentation is the > > least exciting part of any project. > > > > I feel, the people best placed to document the project, are those > > contributing the functionality to the source, however slow it creeps in. > > > > What we are tossing around here, is the idea of creating a collection of > > both small snippets of individual control syntax, and larger working > > examples for all to benefit from, and is somewhat outside of the official > > documentation. > > And this is a good idea, to augment the official documentation. > > I'll continue to lobby for all sample code to be embedded in working > scripts, so that people can play/modify from there. In an associated > text document, quoting particular snippets of code is OK, but there > should always be a reference to the complete script in which the > technique is used. (It might not hurt to point back to the document, > from the code, also, to keep things maintainable and in sync.) > > I've just found in the past that snippets are often described without > describing their underlying assumed requirements, which can be beastly > difficult for new users to comprehend... and then they give up... > whereas if everything is in working samples, there are no unstated > assumptions... the assumptions may not all make it into the text, but > they made it into the code! > > > > > The list is full of questions from new users requesting an example of 'how > > do I add' or 'how do I make'. > > > > The question I originally started, was whether their was an existing > > facility or repository to easily add or post examples to, so that at least > > they could be under 'Control' headings and not scattered throughout 3 years > > of user list. > > > > I spend an equal amount of time using PHP and have found great benefit from > > the PHP documentation that also contains user contributed > > notes/snippets/examples after each command reference. I had originally > > thought something similar would be of great benefit to both new and seasoned > > users of Win32::GUI > > > > Chris Wearn > > > > > > > > -----Original Message----- > > From: per...@li... > > [mailto:per...@li...]On Behalf Of > > Frazier, Joe Jr > > Sent: Monday, 15 November 2004 08:56 > > To: Chris Wearn > > Cc: Win32-GUI List > > Subject: RE: [perl-win32-gui-users] Website - Code snippets gallery > > > > > > Chris, this is a good idea, but I personally would much prefer if > > someone to spend their time fleshing out the official documentation. > > Putting examples there would be the most appropriate place and there are > > still a lot of methods in there with "TDB". The main reason I bring > > this is up is that I have recently had to start really playing with Java > > for my work and the official Javadoc stuff is horribly lite on examples, > > (unlink most perl modules out there, which are usually fairly good). > > > > Joe Frazier, Jr. > > > > <editorial> > > A good example is the Date class. Many of the methods and constructors > > in this class are depreciated, and it points you to the Calendar Class > > or the DateFormat class. One would logically think that these two > > classes would be subclasses so that you can pass these to a method that > > takes a date, but no.... You have to convert to a date object > > explicitly. Stupid Java.... > > </editorial> > > > >>-----Original Message----- > >>From: per...@li... > >>[mailto:per...@li...] On > >>Behalf Of Chris Wearn > >>Sent: Monday, November 15, 2004 7:28 AM > >>To: Jez White > >>Cc: Win32-GUI List > >>Subject: RE: [perl-win32-gui-users] Website - Code snippets gallery > >> > >>Hiya Jez, > >> > >>I agree that a Win32::GUI cookbook would be a great idea, > >>available as a document that you can print out and read, > >>while being able to download an electronic copy, to enable > >>the 'cutting & pasting' of examples. > >> > >>To ease editing, add styles and colour coding, a MS Word > >>document would probably be the most common format. It can > >>then be read in Star Office, and a PDF version could also be output. > >> > >>I'm happy to do some assembly... and make a > >>'work-in-progress' version available via a link on my domain. > >> > >>Once we have got to various stages we can commit it to CVS on > >>sourceforge. > >> > >>Unless someone else with a degree in publishing, a Mac with > >>Quark and nothing else to do, wishes to volunteer... > >> > >>Otherwise, start emailing me content/examples... > >> > >>Chris Wearn > >> > >>-----Original Message----- > >>From: Jez White [mailto:je...@je...] > >>Sent: Monday, 15 November 2004 06:59 > >>To: Glenn Linderman; Chris Wearn > >>Cc: Win32-GUI List > >>Subject: Re: [perl-win32-gui-users] Website - Code snippets gallery > >> > >> > >> > >>>>There are many examples / small snippets of code that > >> > >>could serve as > >> > >>>>examples to others, we just need a place to easily store and > >>>>collectively showcase them. Something like a forum (I run > >> > >>one using > >> > >>>>phpBB). Is there any way of doing this on Sourceforge or > >> > >>some other > >> > >>>>place where people can paste in 'how to' snippets, or do we start > >>>>one. > >> > >>I too think we need a place for these snippets - a Win32::GUI > >>cookbook of sorts. It's a question of who is prepared to > >>maintain/organise it? Any offers? > >> > >> > >>>It is always delightful when someone offers some of the hard-won > >>>fruits of their labors to share with others. Thanks for > >> > >>thinking of it. > >> > >>>This is probably a nice snippet of code... but it isn't complete > >>>enough to run, so I can't tell for sure. Probably adding a > >> > >>few lines > >> > >>>at the top to use strict; use warnings; use Win32::GUI; and to > >>>initialize the > >> > >>I've created an example, and have added to CVS - the code is > >>also below. The only thing you need to do is to have a bitmap > >>of some description - I was going to add a bitmap to CVS so > >>the script would run, but I don't think the world is ready > >>for my art skills:) > >> > >>Cheers, > >> > >>jez. > >> > >>------------- > >>use Win32::GUI; > >>use strict; > >> > >>my ($width,$height); > >>my $mainwin; > >> > >>#try to load the splash bitmap from the exe that is running > >>my $splashimage= new Win32::GUI::Bitmap('SPLASH'); unless > >>($splashimage) { > >> #bitmap is not in exe, load from file > >> $splashimage= new Win32::GUI::Bitmap('SPLASH.bmp'); > >> die 'could not find splash bitmap' unless $splashimage; > >> #get the dimensions of the bitmap > >> ($width,$height) = $splashimage->Info(); > >> } > >> > >>#create the splash window > >>my $splash = new Win32::GUI::Window ( > >> -name => "Splash", > >> -text => "Splash", > >> -height => $height, > >> -width => $width, > >> -left => 100, > >> -top => 100, > >> -addstyle => WS_POPUP, > >> -popstyle => WS_CAPTION | WS_THICKFRAME, > >> -addexstyle => WS_EX_TOPMOST > >>); > >> > >>#create a label in which the bitmap will be placed > >>my $bitmap = $splash->AddLabel( > >> -name => "Bitmap", > >> -left => 0, > >> -top => 0, > >> -width => $width, > >> -height => $height, > >> -bitmap => $splashimage, > >>); > >>$bitmap->SetImage( $splashimage ); > >> > >>#center the splash and show it > >>$splash->Center; > >>$splash->Show(); > >>#call do events - not Dialog - this will display the window > >>and let us #build the rest of the application. > >>Win32::GUI::DoEvents; > >> > >>#A good way of building your application is to keep > >>everything in packages, and eval those #into scope in this > >>phase. In this case, we'll create the main window and sleep > >>to simulate #some work. > >>my $string = q ` > >> $mainwin = new Win32::GUI::Window ( > >> -name => "Main", > >> -text => "Main window", > >> -height => 400, > >> -width => 400, > >> ); > >> sleep(2); > >> $mainwin->Center(); > >> $mainwin->Show(); > >> `; > >>#eval the code and report any errors > >>eval $string; > >>if ($@) { > >> my $message = $@; > >> Win32::GUI::MessageBox($splash, $message ,"Build Error", > >>MB_OK | MB_ICONWARNING); > >> } > >>#hide the splash and enter the Dialog phase $splash->Hide; > >>Win32::GUI::Dialog(); > >> > >> > >> > >> > >> > >>------------------------------------------------------- > >>This SF.Net email is sponsored by: InterSystems CACHE FREE > >>OODBMS DOWNLOAD - A multidimensional database that combines > >>robust object and relational technologies, making it a > >>perfect match for Java, C++,COM, XML, ODBC and JDBC. > >>www.intersystems.com/match8 > >>_______________________________________________ > >>Perl-Win32-GUI-Users mailing list > >>Per...@li... > >>https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > >> > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: InterSystems CACHE > > FREE OODBMS DOWNLOAD - A multidimensional database that combines > > robust object and relational technologies, making it a perfect match > > for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 > > _______________________________________________ > > Perl-Win32-GUI-Users mailing list > > Per...@li... > > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > > > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: InterSystems CACHE > > FREE OODBMS DOWNLOAD - A multidimensional database that combines > > robust object and relational technologies, making it a perfect match > > for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 > > _______________________________________________ > > Perl-Win32-GUI-Users mailing list > > Per...@li... > > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > > > > > > > > -- > Glenn -- http://nevcal.com/ > =========================== > Having identified a vast realm of ignorance, Wolfram is saying that much > of this realm lies forever outside the light cone of human knowledge. > -- Michael Swaine, Dr Dobbs Journal, Sept 2002 > > ------------------------------------------------------- > This SF.Net email is sponsored by: InterSystems CACHE > FREE OODBMS DOWNLOAD - A multidimensional database that combines > robust object and relational technologies, making it a perfect match > for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > |
From: Jez W. <je...@je...> - 2004-11-23 08:51:55
|
Hi, I must admit I would buy a win32::gui cookbook:) I think the market for a real book is a little limited though - in my view the biggest problem with win32::gui is it's exposure. I still come across developers who are using TK or web based front ends for win32 apps simply because they didn't know win32::gui existed. If for example, win32::gui was included in all activestate win32 distributions, then you would be a ready made market! Good luck, Cheers, jez. ----- Original Message ----- From: "Alex Lee" <sim...@gm...> To: "Win32-GUI List" <per...@li...> Sent: Tuesday, November 23, 2004 7:10 AM Subject: Re: FW: [perl-win32-gui-users] Website - Code snippets gallery > Hi all: I think win32::gui cookbook is a great idea. Has anyone even > think about trying to officially publish it. I don't mind putting out > the money for self-publish I-universe type book and split the profit! > ;) > I can actually submit a few examples mysef. > Please let me know if anyone is interested. > > al ;) > > > On Mon, 15 Nov 2004 10:17:17 -0800, Glenn Linderman <pe...@ne...> > wrote: >> On approximately 11/15/2004 7:29 AM, came the following characters from >> >> >> the keyboard of Chris Wearn: >> >> > I agree that the official documentation describing each control, it's >> > methods and properties are each described in greater detail (especially >> > the >> > TDB ones), also a list of depreciated methods and their replacements. I >> > also >> > note that with each build or commit to CVS, Laurent has documented more >> > and >> > more of these... I know from personal experience that documentation is >> > the >> > least exciting part of any project. >> > >> > I feel, the people best placed to document the project, are those >> > contributing the functionality to the source, however slow it creeps >> > in. >> > >> > What we are tossing around here, is the idea of creating a collection >> > of >> > both small snippets of individual control syntax, and larger working >> > examples for all to benefit from, and is somewhat outside of the >> > official >> > documentation. >> >> And this is a good idea, to augment the official documentation. >> >> I'll continue to lobby for all sample code to be embedded in working >> scripts, so that people can play/modify from there. In an associated >> text document, quoting particular snippets of code is OK, but there >> should always be a reference to the complete script in which the >> technique is used. (It might not hurt to point back to the document, >> from the code, also, to keep things maintainable and in sync.) >> >> I've just found in the past that snippets are often described without >> describing their underlying assumed requirements, which can be beastly >> difficult for new users to comprehend... and then they give up... >> whereas if everything is in working samples, there are no unstated >> assumptions... the assumptions may not all make it into the text, but >> they made it into the code! >> >> >> >> > The list is full of questions from new users requesting an example of >> > 'how >> > do I add' or 'how do I make'. >> > >> > The question I originally started, was whether their was an existing >> > facility or repository to easily add or post examples to, so that at >> > least >> > they could be under 'Control' headings and not scattered throughout 3 >> > years >> > of user list. >> > >> > I spend an equal amount of time using PHP and have found great benefit >> > from >> > the PHP documentation that also contains user contributed >> > notes/snippets/examples after each command reference. I had originally >> > thought something similar would be of great benefit to both new and >> > seasoned >> > users of Win32::GUI >> > >> > Chris Wearn >> > >> > >> > >> > -----Original Message----- >> > From: per...@li... >> > [mailto:per...@li...]On Behalf Of >> > Frazier, Joe Jr >> > Sent: Monday, 15 November 2004 08:56 >> > To: Chris Wearn >> > Cc: Win32-GUI List >> > Subject: RE: [perl-win32-gui-users] Website - Code snippets gallery >> > >> > >> > Chris, this is a good idea, but I personally would much prefer if >> > someone to spend their time fleshing out the official documentation. >> > Putting examples there would be the most appropriate place and there >> > are >> > still a lot of methods in there with "TDB". The main reason I bring >> > this is up is that I have recently had to start really playing with >> > Java >> > for my work and the official Javadoc stuff is horribly lite on >> > examples, >> > (unlink most perl modules out there, which are usually fairly good). >> > >> > Joe Frazier, Jr. >> > >> > <editorial> >> > A good example is the Date class. Many of the methods and constructors >> > in this class are depreciated, and it points you to the Calendar Class >> > or the DateFormat class. One would logically think that these two >> > classes would be subclasses so that you can pass these to a method that >> > takes a date, but no.... You have to convert to a date object >> > explicitly. Stupid Java.... >> > </editorial> >> > >> >>-----Original Message----- >> >>From: per...@li... >> >>[mailto:per...@li...] On >> >>Behalf Of Chris Wearn >> >>Sent: Monday, November 15, 2004 7:28 AM >> >>To: Jez White >> >>Cc: Win32-GUI List >> >>Subject: RE: [perl-win32-gui-users] Website - Code snippets gallery >> >> >> >>Hiya Jez, >> >> >> >>I agree that a Win32::GUI cookbook would be a great idea, >> >>available as a document that you can print out and read, >> >>while being able to download an electronic copy, to enable >> >>the 'cutting & pasting' of examples. >> >> >> >>To ease editing, add styles and colour coding, a MS Word >> >>document would probably be the most common format. It can >> >>then be read in Star Office, and a PDF version could also be output. >> >> >> >>I'm happy to do some assembly... and make a >> >>'work-in-progress' version available via a link on my domain. >> >> >> >>Once we have got to various stages we can commit it to CVS on >> >>sourceforge. >> >> >> >>Unless someone else with a degree in publishing, a Mac with >> >>Quark and nothing else to do, wishes to volunteer... >> >> >> >>Otherwise, start emailing me content/examples... >> >> >> >>Chris Wearn >> >> >> >>-----Original Message----- >> >>From: Jez White [mailto:je...@je...] >> >>Sent: Monday, 15 November 2004 06:59 >> >>To: Glenn Linderman; Chris Wearn >> >>Cc: Win32-GUI List >> >>Subject: Re: [perl-win32-gui-users] Website - Code snippets gallery >> >> >> >> >> >> >> >>>>There are many examples / small snippets of code that >> >> >> >>could serve as >> >> >> >>>>examples to others, we just need a place to easily store and >> >>>>collectively showcase them. Something like a forum (I run >> >> >> >>one using >> >> >> >>>>phpBB). Is there any way of doing this on Sourceforge or >> >> >> >>some other >> >> >> >>>>place where people can paste in 'how to' snippets, or do we start >> >>>>one. >> >> >> >>I too think we need a place for these snippets - a Win32::GUI >> >>cookbook of sorts. It's a question of who is prepared to >> >>maintain/organise it? Any offers? >> >> >> >> >> >>>It is always delightful when someone offers some of the hard-won >> >>>fruits of their labors to share with others. Thanks for >> >> >> >>thinking of it. >> >> >> >>>This is probably a nice snippet of code... but it isn't complete >> >>>enough to run, so I can't tell for sure. Probably adding a >> >> >> >>few lines >> >> >> >>>at the top to use strict; use warnings; use Win32::GUI; and to >> >>>initialize the >> >> >> >>I've created an example, and have added to CVS - the code is >> >>also below. The only thing you need to do is to have a bitmap >> >>of some description - I was going to add a bitmap to CVS so >> >>the script would run, but I don't think the world is ready >> >>for my art skills:) >> >> >> >>Cheers, >> >> >> >>jez. >> >> >> >>------------- >> >>use Win32::GUI; >> >>use strict; >> >> >> >>my ($width,$height); >> >>my $mainwin; >> >> >> >>#try to load the splash bitmap from the exe that is running >> >>my $splashimage= new Win32::GUI::Bitmap('SPLASH'); unless >> >>($splashimage) { >> >> #bitmap is not in exe, load from file >> >> $splashimage= new Win32::GUI::Bitmap('SPLASH.bmp'); >> >> die 'could not find splash bitmap' unless $splashimage; >> >> #get the dimensions of the bitmap >> >> ($width,$height) = $splashimage->Info(); >> >> } >> >> >> >>#create the splash window >> >>my $splash = new Win32::GUI::Window ( >> >> -name => "Splash", >> >> -text => "Splash", >> >> -height => $height, >> >> -width => $width, >> >> -left => 100, >> >> -top => 100, >> >> -addstyle => WS_POPUP, >> >> -popstyle => WS_CAPTION | WS_THICKFRAME, >> >> -addexstyle => WS_EX_TOPMOST >> >>); >> >> >> >>#create a label in which the bitmap will be placed >> >>my $bitmap = $splash->AddLabel( >> >> -name => "Bitmap", >> >> -left => 0, >> >> -top => 0, >> >> -width => $width, >> >> -height => $height, >> >> -bitmap => $splashimage, >> >>); >> >>$bitmap->SetImage( $splashimage ); >> >> >> >>#center the splash and show it >> >>$splash->Center; >> >>$splash->Show(); >> >>#call do events - not Dialog - this will display the window >> >>and let us #build the rest of the application. >> >>Win32::GUI::DoEvents; >> >> >> >>#A good way of building your application is to keep >> >>everything in packages, and eval those #into scope in this >> >>phase. In this case, we'll create the main window and sleep >> >>to simulate #some work. >> >>my $string = q ` >> >> $mainwin = new Win32::GUI::Window ( >> >> -name => "Main", >> >> -text => "Main window", >> >> -height => 400, >> >> -width => 400, >> >> ); >> >> sleep(2); >> >> $mainwin->Center(); >> >> $mainwin->Show(); >> >> `; >> >>#eval the code and report any errors >> >>eval $string; >> >>if ($@) { >> >> my $message = $@; >> >> Win32::GUI::MessageBox($splash, $message ,"Build Error", >> >>MB_OK | MB_ICONWARNING); >> >> } >> >>#hide the splash and enter the Dialog phase $splash->Hide; >> >>Win32::GUI::Dialog(); >> >> >> >> >> >> >> >> >> >> >> >>------------------------------------------------------- >> >>This SF.Net email is sponsored by: InterSystems CACHE FREE >> >>OODBMS DOWNLOAD - A multidimensional database that combines >> >>robust object and relational technologies, making it a >> >>perfect match for Java, C++,COM, XML, ODBC and JDBC. >> >>www.intersystems.com/match8 >> >>_______________________________________________ >> >>Perl-Win32-GUI-Users mailing list >> >>Per...@li... >> >>https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users >> >> >> > >> > >> > >> > ------------------------------------------------------- >> > This SF.Net email is sponsored by: InterSystems CACHE >> > FREE OODBMS DOWNLOAD - A multidimensional database that combines >> > robust object and relational technologies, making it a perfect match >> > for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 >> > _______________________________________________ >> > Perl-Win32-GUI-Users mailing list >> > Per...@li... >> > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users >> > >> > >> > >> > >> > ------------------------------------------------------- >> > This SF.Net email is sponsored by: InterSystems CACHE >> > FREE OODBMS DOWNLOAD - A multidimensional database that combines >> > robust object and relational technologies, making it a perfect match >> > for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 >> > _______________________________________________ >> > Perl-Win32-GUI-Users mailing list >> > Per...@li... >> > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users >> > >> > >> > >> >> -- >> Glenn -- http://nevcal.com/ >> =========================== >> Having identified a vast realm of ignorance, Wolfram is saying that much >> of this realm lies forever outside the light cone of human knowledge. >> -- Michael Swaine, Dr Dobbs Journal, Sept 2002 >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by: InterSystems CACHE >> FREE OODBMS DOWNLOAD - A multidimensional database that combines >> robust object and relational technologies, making it a perfect match >> for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 >> _______________________________________________ >> Perl-Win32-GUI-Users mailing list >> Per...@li... >> https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users >> > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://productguide.itmanagersjournal.com/ > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users |
From: Alex L. <sim...@gm...> - 2004-11-23 17:31:41
|
I think you guys are right. There probably is a very limited market, but on the other hand I think a book itself will generate publicity. This is how I see it as and why i think publishing is useful. 1a) the book would generate is own publicity and with this some legetimicy - thus I think it would also be easier to convince Activestate and other repositry of its importance. It is surprising to me that activestate is taking such a non-active role in this module because more people using win32::gui could boost ther "perlapp" distrbution as well. 1) There are many perl "hackers" out there, and many I believe would not mind having the capapibility to code a windows program. I think, due to exposure, that some of them has never even heard of this module. A book could just be enough to spark their interest. 2) the book could lure people just starting out. I think most people go towards vb or c++ because perl does not have, or they don't think have the capibility to code for windows app. 2b) tk is not win32::gui 3) Besides the book could be title something like programming windows app with perl, which could be more general and catchy. 4) its fun. I say lets not care about how many books we can sell. As long as I can sell about 15 and make back the initial invenstment I would be cool with that ;) so please contact me if you anyone is interested, cause I am seriously thinking about doing this - just need a couple of more guys/gal to help out. al ;) On Tue, 23 Nov 2004 08:51:56 -0000, Jez White <je...@je...> wrote: > Hi, > > I must admit I would buy a win32::gui cookbook:) > > I think the market for a real book is a little limited though - in my view > the biggest problem with win32::gui is it's exposure. I still come across > developers who are using TK or web based front ends for win32 apps simply > because they didn't know win32::gui existed. If for example, win32::gui was > included in all activestate win32 distributions, then you would be a ready > made market! > > Good luck, |
From: Jez W. <je...@je...> - 2004-11-24 20:52:24
|
>I think you guys are right. There probably is a very limited market, > but on the other hand I think a book itself will generate publicity. > This is how I see it as and why i think publishing is useful. > > 1a) the book would generate is own publicity and with this some > 1) There are many perl "hackers" out there, and many I believe would > 2) the book could lure people just starting out. I think most people > 3) Besides the book could be title something like programming windows > app with perl, which could be more general and catchy. > 4) its fun. I say lets not care about how many books we can sell. As All valid reasons - I hope the lack of public replies hasn't put you off - I'm sure you'll face allot of apathy - hopefully this book can become a driver for the win32::gui project:) As a test bed, it might be worth seeing if you can convince activestate to include win32::gui in there core distribution - if you need any vocal support, let the list know;) > so please contact me if you anyone is interested, cause I am seriously > thinking about doing this - just need a couple of more guys/gal to > help out. I'm interested - I'm not sure what I can contribute, and my spare time is limited - but drop me a mail of list if need be. Cheers, and good luck, jez. |
From: Harlan C. <key...@ya...> - 2004-11-27 12:41:42
|
Alex, I program Perl on Windows exclusively, and would be very interested in something like this. I can put together GUIs...been doing it in Java, Tk, and using Win32::GUI. One thing I'd be interested in would be how to write a Windows app that has a GUI that responds when you click buttons, but the underlying activities/background processes continue to run. I'd be willing to help as much as I can. Thanks, Harlan --- Alex Lee <sim...@gm...> wrote: > I think you guys are right. There probably is a very > limited market, > but on the other hand I think a book itself will > generate publicity. > This is how I see it as and why i think publishing > is useful. > > 1a) the book would generate is own publicity and > with this some > legetimicy - thus I think it would also be easier to > convince > Activestate and other repositry of its importance. > It is surprising to > me that activestate is taking such a non-active role > in this module > because more people using win32::gui could boost > ther "perlapp" > distrbution as well. > 1) There are many perl "hackers" out there, and many > I believe would > not mind having the capapibility to code a windows > program. I think, > due to exposure, that some of them has never even > heard of this > module. A book could just be enough to spark their > interest. > 2) the book could lure people just starting out. I > think most people > go towards vb or c++ because perl does not have, or > they don't think > have the capibility to code for windows app. > 2b) tk is not win32::gui > 3) Besides the book could be title something like > programming windows > app with perl, which could be more general and > catchy. > 4) its fun. I say lets not care about how many books > we can sell. As > long as I can sell about 15 and make back the > initial invenstment I > would be cool with that ;) > > so please contact me if you anyone is interested, > cause I am seriously > thinking about doing this - just need a couple of > more guys/gal to > help out. > > al ;) > > On Tue, 23 Nov 2004 08:51:56 -0000, Jez White > <je...@je...> wrote: > > Hi, > > > > I must admit I would buy a win32::gui cookbook:) > > > > I think the market for a real book is a little > limited though - in my view > > the biggest problem with win32::gui is it's > exposure. I still come across > > developers who are using TK or web based front > ends for win32 apps simply > > because they didn't know win32::gui existed. If > for example, win32::gui was > > included in all activestate win32 distributions, > then you would be a ready > > made market! > > > > Good luck, > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT > Products from real users. > Discover which products truly live up to the hype. > Start reading now. > http://productguide.itmanagersjournal.com/ > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > ===== ------------------------------------------ Harlan Carvey, CISSP "Windows Forensics and Incident Recovery" http://www.windows-ir.com http://groups.yahoo.com/group/windowsir/ "Meddle not in the affairs of dragons, for you are crunchy, and good with ketchup." "The simplicity of this game amuses me. Bring me your finest meats and cheeses." ------------------------------------------ |
From: Jez W. <je...@je...> - 2004-11-28 12:09:17
|
Hi, > I can put together GUIs...been doing it in Java, Tk, > and using Win32::GUI. One thing I'd be interested in > would be how to write a Windows app that has a GUI > that responds when you click buttons, but the > underlying activities/background processes continue to > run. This is doable by using threads - you will probably better of using the latest version of Perl (5.8.4?) as you can, since threading is generally weak in early versions. Win32::gui seems fine with threads since I've been able to create C threads (via an xs module) which were able to fire events in the GUI via windows SendMessages. Cheers, jez. |
From: Alex L. <sim...@gm...> - 2004-11-28 19:29:05
|
Thank you all for the support so far! I am currently putting together an outline and would shortly email those who are interested. The initial step is to see what we want to put in and just as importantly -- what we want to leave out! Your input would be greatly appreciated. Holiday and work is really slowing me down though. And just to add to Jez's comment on threading- you can also activate external programs without locking your own program. There are many ways to do this. You can use Win32::Process for example or you can try an API call like this: use Win32::API; my @API =('none', 'WinEnc', "open", 'selected', 0 ,'current', 1); my $apiExecute = new Win32::API("Shell32", "ShellExecute", ['P','P','P','P','P','N'], 'N'); $API[3]= "C:\\WINDOWS\\notepad.exe"; ## selected file $API[5] = "C:\\WINDOWS\\"; ## directory $apiExecute->Call($API[1],$API[2],$API[3],$API[4],$API[5],10); # execute Its a little fancy but I feel that its more useful in some ways than win32::process. For one thing the module is easier to find! The next, I could be wrong (because win32::process maybe able to do it too), but I find that this approach can open not just executables but other files such as text file or and .xls (excel file) and the result would be that the program will open the app that the extension is linked. al ;) |
From: Harlan C. <key...@ya...> - 2004-11-29 02:41:41
|
Jez, Do you have examples of this? Thanks, Harlan --- Jez White <je...@je...> wrote: > Hi, > > > I can put together GUIs...been doing it in Java, > Tk, > > and using Win32::GUI. One thing I'd be interested > in > > would be how to write a Windows app that has a GUI > > that responds when you click buttons, but the > > underlying activities/background processes > continue to > > run. > > This is doable by using threads - you will probably > better of using the > latest version of Perl (5.8.4?) as you can, since > threading is generally > weak in early versions. Win32::gui seems fine with > threads since I've been > able to create C threads (via an xs module) which > were able to fire events > in the GUI via windows SendMessages. > > Cheers, > > jez. > > ===== ------------------------------------------ Harlan Carvey, CISSP "Windows Forensics and Incident Recovery" http://www.windows-ir.com http://groups.yahoo.com/group/windowsir/ "Meddle not in the affairs of dragons, for you are crunchy, and good with ketchup." "The simplicity of this game amuses me. Bring me your finest meats and cheeses." ------------------------------------------ |
From: Jez W. <je...@je...> - 2004-11-29 10:42:23
|
Hi, Any example would contain lots of C code. I can give an overview which would be probably more useful: The main problem is getting your GUI talking to the threaded backend - this is true of any language toolset - in this case the front end is in Perl, while most of the backend is in C (contained in XS or dll's). I create two semaphore controlled queues, one input queue and one output queue - when the queue is full the calling thread will block. To 'talk' from perl to C, I create a simple XS function that adds items to this queue, unless the queue is full, the function wont block. To 'talk' from C to Perl, I use the windows function sendmessage that causes an event to fire in the GUI and another XS function is used to take items from the queue. When the application starts I pass the window handles(s) of my application to the C backend (eg $window->{-handle}) and when I need to fire an event in the GUI I use: SendMessage(winHand,512,&message,0); Which fires the mouse move event for the passed in window handle. You can then use simple logic to work out if the event came from a genuine mouse move, or from the C backend. If from the C backend, you call a funtion that gets the items from the queue. Hope that helps, Cheers, jez. ----- Original Message ----- From: "Harlan Carvey" <key...@ya...> To: "Jez White" <je...@je...>; "Alex Lee" <sim...@gm...>; "Win32-GUI List" <per...@li...> Sent: Monday, November 29, 2004 2:41 AM Subject: Re: FW: [perl-win32-gui-users] Website - Code snippets gallery > Jez, > > Do you have examples of this? > > Thanks, > > Harlan > > --- Jez White <je...@je...> wrote: > >> Hi, >> >> > I can put together GUIs...been doing it in Java, >> Tk, >> > and using Win32::GUI. One thing I'd be interested >> in >> > would be how to write a Windows app that has a GUI >> > that responds when you click buttons, but the >> > underlying activities/background processes >> continue to >> > run. >> >> This is doable by using threads - you will probably >> better of using the >> latest version of Perl (5.8.4?) as you can, since >> threading is generally >> weak in early versions. Win32::gui seems fine with >> threads since I've been >> able to create C threads (via an xs module) which >> were able to fire events >> in the GUI via windows SendMessages. >> >> Cheers, >> >> jez. >> >> > > > ===== > ------------------------------------------ > Harlan Carvey, CISSP > "Windows Forensics and Incident Recovery" > http://www.windows-ir.com > http://groups.yahoo.com/group/windowsir/ > > "Meddle not in the affairs of dragons, for > you are crunchy, and good with ketchup." > > "The simplicity of this game amuses me. > Bring me your finest meats and cheeses." > ------------------------------------------ |