Is it possible to create a window without the "Minimize/Maximize/Close"
buttons? My users sometimes hit the Close button rather than exit via my
program, which leaves messy background processes running. I guess an
alternative would be to map the Close button to my exit code. Is that
To disable the "Maximize" box, use:
$window = new Win32::GUI::Window( -maximizebox => 0 );
I'm assuming that -minimizebox would do the same for the "Minimize" one.
I've not hidden the Close box before, so I can't help you with that one.
Concerning your exit code, you can use your Window name and then
_Terminate. For example:
$window = new Win32::GUI::Window( -name => '_Window' }
sub _Window_Terminate {
¬e("Quitting due to window termination.");
&exit_program;
}
&exit_program is just a routine I use for FileQuit's, SystrayQuit's, and so
on and so forth. It cleans up a bunch of junk. You can see this and more in
my AmphetaDesk source code:
# the main site.
http://www.disobey.com/amphetadesk/
# this is one URL, splitted for your email program.
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/amphetadesk/AmphetaDesk
/lib/Windows.pl?rev=1.36&content-type=text/vnd.viewcvs-markup
--
Morbus Iff ( softcore vulcan porn rulezzzzz )
http://www.disobey.com/ && http://www.gamegrene.com/
please me: http://www.amazon.com/exec/obidos/wishlist/25USVJDH68554
icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus