$_ = Win32::GUI::FindWindow ("Shell_TrayWnd", ""); @_ = Win32::GUI::GetWindowRect ($_);
$width = $_[2] - $_[0]; $height = $_[3] - $_[1]; tested on Win2k and Win98. Interestingly, the position of the taskbar is slightly off the screen (-2). Note that the taskbar can be moved to each of the four window edges (eight on dual-screen, which would look like off the desktop), so don't put your program fixed at (0,0). I have mine upright at the left side instead of flat at the bottom. If it takes up less of the vertical extend, which programs use for status bars, tool bars, menu bars and so on. Take web browsers for instance. Web pages are usually longer than the screen height but less wide than the screen width. Have fun, Harald | -----Original Message----- | From: Webmaster CZ [mailto:[EMAIL PROTECTED] | Sent: Wednesday, May 23, 2001 12:51 | To: perl-win32-gui-users@lists.sourceforge.net | Subject: [perl-win32-gui-users] Taskbar & perl2exe -gui crash | | | Hi ! | | I have two problems: | | a) | My program start in maximal width & height with this code: | | ---------Code---------------- | $screensize = Win32::GUI::GetDesktopWindow(); | $screensize_width = Win32::GUI::Width($screensize); | $screensize_height = Win32::GUI::Height($screensize); | ---------Code---------------- | | The problem is, that i must subtract the size of the Taskbar... | so how can i read the size (height) of it ???? | | | b) | If i compile my program with perl2exe and "-gui", then the | program crash on exit.... ever: the "exit code" are: | | -----------Code----------- | sub Window_Terminate { | return -1; | } | | sub Exit_Click { | return -1; | } | ------------Code--------- | | Any idea ??? | | | | cu | Thorsten Sommer | | | _______________________________________________ | Perl-Win32-GUI-Users mailing list | Perl-Win32-GUI-Users@lists.sourceforge.net | http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users |