From: Frazier, J. J. <Joe...@Pe...> - 2002-10-07 22:08:01
|
Dude, Those ROCK!!!! Thanks for taking the time to play with and come = up with these. Maybe they will get into the next version. Keep = sending new ones when you find them. =20 Joe Frazier, Jr.=20 Technical Support Engineer=20 Peopleclick Service Support=20 Tel: +1-800-841-2365=20 E-Mail: mailto:su...@pe...=20 -----Original Message----- From: Luigino Masarati [mailto:lma...@ou...] Sent: Thursday, October 03, 2002 8:18 AM To: per...@li... Subject: [perl-win32-gui-users] Animated windows Hi, I searched in this mailing list how to create animated windows like = start menu in W2K/XP (see Win32 SDK - Layered Windows = http://msdn.microsoft.com/library/default.asp?url=3D/library/en-us/winui/= winui/windowsuserinterface/windowing/windows/windowreference/windowfuncti= ons/animatewindow.asp) and found nothing about it, so i searched on MSDN = and found the API code and tried until i got it. =20 Note that this functionality is fully supported by Windows 98/2000/XP = only. =20 Here is the code, hope it will be useful to someone else... =20 #----------------------------- # use Win32::GUI etc...=20 =20 use Win32; use Win32::API; =20 use constant AW_HOR_POSITIVE =3D> 0x00000001; use constant AW_HOR_NEGATIVE =3D> 0x00000002; use constant AW_VER_POSITIVE =3D> 0x00000004; use constant AW_VER_NEGATIVE =3D> 0x00000008; use constant AW_CENTER =3D> 0x00000010; use constant AW_HIDE =3D> 0x00010000; use constant AW_ACTIVATE =3D> 0x00020000; use constant AW_SLIDE =3D> 0x00040000; use constant AW_BLEND =3D> 0x00080000; =20 # BOOL AnimateWindow( # HWND hwnd, # DWORD dwTime, # DWORD dwFlags # ); my $AnimateWindow =3D new Win32::API("user32", "AnimateWindow", [ 'N', = 'N', 'N' ], 'N') or $reg{'UI'}{'Fading'} =3D 0; =20 # ... here create your window object ($winObj) as ususal... =20 # set animation duration in ms (usually 200ms) my $msec =3D 200; =20 # FADE IN # use this command in place of $objWin->Show() $AnimateWindow->Call($winObj->{-handle}, $msec, AW_ACTIVATE | AW_BLEND = ); =20 # FADE OUT # use this command in place of $objWin->Hide() for example in = winObj_Terminate() $AnimateWindow->Call($winObj->{-handle}, $msec, AW_HIDE | AW_BLEND ); =20 # Some alternatives follows... =20 # APPEAR from LEFT-TOP # use this command in place of $objWin->Show() # $AnimateWindow->Call($winObj->{-handle}, $msec, AW_ACTIVATE | AW_SLIDE = | AW_HOR_POSITIVE | AW_VER_POSITIVE ); =20 # DISAPPEAR from RIGHT-BOTTOM # use this command in place of $objWin->Hide() for example in = winObj_Terminate() # $AnimateWindow->Call($winObj->{-handle}, $msec, AW_HIDE | AW_SLIDE | = AW_HOR_NEGATIVE | AW_VER_NEGATIVE ); =20 # GROW from CENTER # use this command in place of $objWin->Show() # $AnimateWindow->Call($winObj->{-handle}, $msec, AW_ACTIVATE | = AW_CENTER ); =20 # SHRINK to CENTER # use this command in place of $objWin->Hide() for example in = winObj_Terminate() # $AnimateWindow->Call($winObj->{-handle}, $msec, AW_HIDE | AW_CENTER ); =20 #----------------------------- =20 Bye. =20 Luigino Masarati OutSys snc. =20 |
From: Rogers, J. <rog...@oc...> - 2002-10-08 01:58:33
|
I would Like to add my thanks for these as well . The marketing types love eye candy, which means they choose my work, = which keeps me in a JOB! =20 Thankyou for sharing. John Rogers System Engineer Oc=E9 Australia =20 -----Original Message----- From: Frazier, Joe Jr [mailto:Joe...@Pe...] Sent: Tuesday, October 08, 2002 8:08 AM To: Luigino Masarati; per...@li... Subject: RE: [perl-win32-gui-users] Animated windows Dude, Those ROCK!!!! Thanks for taking the time to play with and come = up with these. Maybe they will get into the next version. Keep sending = new ones when you find them. =20 Joe Frazier, Jr.=20 Technical Support Engineer=20 Peopleclick Service Support=20 Tel: +1-800-841-2365=20 E-Mail: mailto:su...@pe... <mailto:su...@pe...> = =20 -----Original Message----- From: Luigino Masarati [mailto:lma...@ou...] Sent: Thursday, October 03, 2002 8:18 AM To: per...@li... Subject: [perl-win32-gui-users] Animated windows Hi, I searched in this mailing list how to create animated windows like start menu in W2K/XP (see Win32 SDK - Layered Windows http://msdn.microsoft.com/library/default.asp?url=3D/library/en-us/winui= /winui /windowsuserinterface/windowing/windows/windowreference/windowfunctions/= anim atewindow.asp <http://msdn.microsoft.com/library/default.asp?url=3D/library/en-us/winu= i/winu i/windowsuserinterface/windowing/windows/windowreference/windowfunctions= /ani matewindow.asp> ) and found nothing about it, so i searched on MSDN and found the API code and tried until i got it. =20 Note that this functionality is fully supported by Windows 98/2000/XP = only. =20 Here is the code, hope it will be useful to someone else... =20 #----------------------------- # use Win32::GUI etc...=20 =20 use Win32; use Win32::API; =20 use constant AW_HOR_POSITIVE =3D> 0x00000001; use constant AW_HOR_NEGATIVE =3D> 0x00000002; use constant AW_VER_POSITIVE =3D> 0x00000004; use constant AW_VER_NEGATIVE =3D> 0x00000008; use constant AW_CENTER =3D> 0x00000010; use constant AW_HIDE =3D> 0x00010000; use constant AW_ACTIVATE =3D> 0x00020000; use constant AW_SLIDE =3D> 0x00040000; use constant AW_BLEND =3D> 0x00080000; =20 # BOOL AnimateWindow( # HWND hwnd, # DWORD dwTime, # DWORD dwFlags # ); my $AnimateWindow =3D new Win32::API("user32", "AnimateWindow", [ 'N', = 'N', 'N' ], 'N') or $reg{'UI'}{'Fading'} =3D 0; =20 # ... here create your window object ($winObj) as ususal... =20 # set animation duration in ms (usually 200ms) my $msec =3D 200; =20 # FADE IN # use this command in place of $objWin->Show() $AnimateWindow->Call($winObj->{-handle}, $msec, AW_ACTIVATE | AW_BLEND = ); =20 # FADE OUT # use this command in place of $objWin->Hide() for example in winObj_Terminate() $AnimateWindow->Call($winObj->{-handle}, $msec, AW_HIDE | AW_BLEND ); =20 # Some alternatives follows... =20 # APPEAR from LEFT-TOP # use this command in place of $objWin->Show() # $AnimateWindow->Call($winObj->{-handle}, $msec, AW_ACTIVATE | = AW_SLIDE | AW_HOR_POSITIVE | AW_VER_POSITIVE ); =20 # DISAPPEAR from RIGHT-BOTTOM # use this command in place of $objWin->Hide() for example in winObj_Terminate() # $AnimateWindow->Call($winObj->{-handle}, $msec, AW_HIDE | AW_SLIDE | AW_HOR_NEGATIVE | AW_VER_NEGATIVE ); =20 # GROW from CENTER # use this command in place of $objWin->Show() # $AnimateWindow->Call($winObj->{-handle}, $msec, AW_ACTIVATE | = AW_CENTER ); =20 # SHRINK to CENTER # use this command in place of $objWin->Hide() for example in winObj_Terminate() # $AnimateWindow->Call($winObj->{-handle}, $msec, AW_HIDE | AW_CENTER = ); =20 #----------------------------- =20 Bye. =20 Luigino Masarati OutSys snc. =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: <gr...@xm...> - 2002-10-08 15:05:27
|
> > # ... here create your window object ($winObj) as ususal... > I know you have done a lot of work to show us how to use these effects, but for me, I've got no idea how to create this object properly. My background is *NIX, and the Win32::GUI module for perl. Hate to ask a dumb question as to how to create a $winObj, but I didn't find anything that made sense on google. I would love to just play with this feature, and see how it looks, any help would be great. Thanks Chris G. |
From: Thomas, T. B <tim...@lm...> - 2002-10-08 15:23:17
|
Here's what I did to get it to work: use Win32; use Win32::GUI; #added use Win32::API; use constant AW_HOR_POSITIVE => 0x00000001; use constant AW_HOR_NEGATIVE => 0x00000002; use constant AW_VER_POSITIVE => 0x00000004; use constant AW_VER_NEGATIVE => 0x00000008; use constant AW_CENTER => 0x00000010; use constant AW_HIDE => 0x00010000; use constant AW_ACTIVATE => 0x00020000; use constant AW_SLIDE => 0x00040000; use constant AW_BLEND => 0x00080000; # BOOL AnimateWindow( # HWND hwnd, # DWORD dwTime, # DWORD dwFlags # ); my $AnimateWindow = new Win32::API("user32", "AnimateWindow", [ 'N', 'N', 'N' ], 'N') or $reg{'UI'}{'Fading'} = 0; # ... here create your window object ($winObj) as ususal... my $winObj = new GUI::Window(-title=>"Test", -left=>10, -top=>10, -width=>640, -height=>480, -name=>"Window",); #added # set animation duration in ms (usually 200ms) my $msec = 200; # FADE IN # use this command in place of $objWin->Show() $AnimateWindow->Call($winObj->{-handle}, $msec, AW_ACTIVATE | AW_BLEND ); # FADE OUT # use this command in place of $objWin->Hide() for example in winObj_Terminate() $AnimateWindow->Call($winObj->{-handle}, $msec, AW_HIDE | AW_BLEND ); # Some alternatives follows... # APPEAR from LEFT-TOP # use this command in place of $objWin->Show() $AnimateWindow->Call($winObj->{-handle}, $msec, AW_ACTIVATE | AW_SLIDE | AW_HOR_POSITIVE | AW_VER_POSITIVE ); # DISAPPEAR from RIGHT-BOTTOM # use this command in place of $objWin->Hide() for example in winObj_Terminate() $AnimateWindow->Call($winObj->{-handle}, $msec, AW_HIDE | AW_SLIDE | AW_HOR_NEGATIVE | AW_VER_NEGATIVE ); # GROW from CENTER # use this command in place of $objWin->Show() $AnimateWindow->Call($winObj->{-handle}, $msec, AW_ACTIVATE | AW_CENTER ); # SHRINK to CENTER # use this command in place of $objWin->Hide() for example in winObj_Terminate() $AnimateWindow->Call($winObj->{-handle}, $msec, AW_HIDE | AW_CENTER ); #----------------------------- -----Original Message----- From: gr...@xm... [mailto:gr...@xm...] Sent: Tuesday, October 08, 2002 9:05 AM Cc: per...@li... Subject: RE: [perl-win32-gui-users] Animated windows > > # ... here create your window object ($winObj) as ususal... > I know you have done a lot of work to show us how to use these effects, but for me, I've got no idea how to create this object properly. My background is *NIX, and the Win32::GUI module for perl. Hate to ask a dumb question as to how to create a $winObj, but I didn't find anything that made sense on google. I would love to just play with this feature, and see how it looks, any help would be great. Thanks Chris G. ------------------------------------------------------- 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: Brewster Rob-R. <Rob...@mo...> - 2002-10-18 10:46:35
|
I've been using this code with great success on Windows2000. (Really adds a professional touch to the GUI!). Now I've added a menu button to my window I get a greyed out background on my TextField boxes. I've tried to update the box's colour but only seem to be able to update the background of the actual text not the whole box. Any ideas? Rob Brewster. # Menu options for GUI #======================================= $menu = Win32::GUI::MakeMenu( "&Help" => "Help", " > -" => 0, " > E&xit" => "Exit", ); #=========================================================================== ==== # Creates the objects and labels for the GUI window 1 # #=========================================================================== ==== sub create_window1 { # Create window $window = new Win32::GUI::Window(-menu => $menu, -title => "Test", -pos => [ 100, 100 ], -size => [ 500, 400 ], -minsize => [ 500, 400], -name => "Window", ); $number= $window->AddTextfield (-text => "(Enter No.)", -name => "Number", -left => 145, -top => 40, -height => 20, -width => 100, ); } sub Window_Terminate { return -1; } # Main function #=============================== create_window1(); $msec = 200; $AnimateWindow->Call($window->{-handle}, $msec, AW_ACTIVATE | AW_CENTER); Win32::GUI::Dialog(); -----Original Message----- From: Luigino Masarati [mailto:lma...@ou...] Sent: 03 October 2002 13:18 To: per...@li... Subject: [perl-win32-gui-users] Animated windows Hi, I searched in this mailing list how to create animated windows like start menu in W2K/XP (see Win32 SDK - Layered Windows http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui /windowsuserinterface/windowing/windows/windowreference/windowfunctions/anim atewindow.asp) and found nothing about it, so i searched on MSDN and found the API code and tried until i got it. Note that this functionality is fully supported by Windows 98/2000/XP only. Here is the code, hope it will be useful to someone else... #----------------------------- # use Win32::GUI etc... use Win32; use Win32::API; use constant AW_HOR_POSITIVE => 0x00000001; use constant AW_HOR_NEGATIVE => 0x00000002; use constant AW_VER_POSITIVE => 0x00000004; use constant AW_VER_NEGATIVE => 0x00000008; use constant AW_CENTER => 0x00000010; use constant AW_HIDE => 0x00010000; use constant AW_ACTIVATE => 0x00020000; use constant AW_SLIDE => 0x00040000; use constant AW_BLEND => 0x00080000; # BOOL AnimateWindow( # HWND hwnd, # DWORD dwTime, # DWORD dwFlags # ); my $AnimateWindow = new Win32::API("user32", "AnimateWindow", [ 'N', 'N', 'N' ], 'N') or $reg{'UI'}{'Fading'} = 0; # ... here create your window object ($winObj) as ususal... # set animation duration in ms (usually 200ms) my $msec = 200; # FADE IN # use this command in place of $objWin->Show() $AnimateWindow->Call($winObj->{-handle}, $msec, AW_ACTIVATE | AW_BLEND ); # FADE OUT # use this command in place of $objWin->Hide() for example in winObj_Terminate() $AnimateWindow->Call($winObj->{-handle}, $msec, AW_HIDE | AW_BLEND ); # Some alternatives follows... # APPEAR from LEFT-TOP # use this command in place of $objWin->Show() # $AnimateWindow->Call($winObj->{-handle}, $msec, AW_ACTIVATE | AW_SLIDE | AW_HOR_POSITIVE | AW_VER_POSITIVE ); # DISAPPEAR from RIGHT-BOTTOM # use this command in place of $objWin->Hide() for example in winObj_Terminate() # $AnimateWindow->Call($winObj->{-handle}, $msec, AW_HIDE | AW_SLIDE | AW_HOR_NEGATIVE | AW_VER_NEGATIVE ); # GROW from CENTER # use this command in place of $objWin->Show() # $AnimateWindow->Call($winObj->{-handle}, $msec, AW_ACTIVATE | AW_CENTER ); # SHRINK to CENTER # use this command in place of $objWin->Hide() for example in winObj_Terminate() # $AnimateWindow->Call($winObj->{-handle}, $msec, AW_HIDE | AW_CENTER ); #----------------------------- Bye. Luigino Masarati OutSys snc. |
From: Luigino M. <lma...@ou...> - 2002-10-18 12:04:40
|
I don't know why but to fix it you should do: $AnimateWindow->Call($window->{-handle}, $msec, AW_ACTIVATE | AW_CENTER); $window->InvalidateRect(0); Bye. Luigino Masarati OutSys snc ----- Original Message ----- From: "Brewster Rob-RBREWST1" <Rob...@mo...> To: "'Luigino Masarati'" <lma...@ou...>; <per...@li...> Sent: Friday, October 18, 2002 12:46 PM Subject: RE: [perl-win32-gui-users] Animated windows > I've been using this code with great success on Windows2000. (Really adds a > professional touch to the GUI!). > > Now I've added a menu button to my window I get a greyed out background on > my TextField boxes. I've tried to update the box's colour but only seem to > be able to update the background of the actual text not the whole box. Any > ideas? > > Rob Brewster. > > > > # Menu options for GUI > #======================================= > $menu = Win32::GUI::MakeMenu( > "&Help" => "Help", > " > -" => 0, > " > E&xit" => "Exit", > ); > > #=========================================================================== > ==== > # Creates the objects and labels for the GUI window 1 > # > #=========================================================================== > ==== > sub create_window1 { > # Create window > $window = new Win32::GUI::Window(-menu => $menu, > -title => "Test", > -pos => [ 100, 100 ], > -size => [ 500, 400 ], > -minsize => [ 500, 400], > -name => "Window", > ); > > $number= $window->AddTextfield (-text => "(Enter No.)", > -name => "Number", > -left => 145, > -top => 40, > -height => 20, > -width => 100, > ); > > } > > > sub Window_Terminate { > return -1; > } > > # Main function > #=============================== > create_window1(); > > $msec = 200; > $AnimateWindow->Call($window->{-handle}, $msec, AW_ACTIVATE | AW_CENTER); > > Win32::GUI::Dialog(); |