On approximately 2/5/2004 12:41 AM, came the following characters from
the keyboard of simon andrews (BI):

From: Glenn Linderman [mailto:[EMAIL PROTECTED] On approximately 2/4/2004 7:52 PM, came the following characters from
the keyboard of Jimmy Bodkin:



I have tried printing the info to STDERR, STDOUT, and just doing a die on the script.

Win32::MsgBox


Actually on a separate point related to this - I made up a small app the other
day, packaged with pp which used Win32::MsgBox to show any errors.

The problem was that if I packed the script using -g then the message box which
opened was created in the background so most of the time you wouldn't notice it
was there.  If I left off the -g then I obviously got a console appear - but the
message boxes would show up in front.

Anyone know of a work round?

I've noticed that sort of behavior in a number of applications, so I don't think it is unique to par.... and should probably be discussed on some other list, but it is related to the other topic.... oh well, here goes:


I think the problem is that the MsgBox inherits its Z order from its parent's Z order, and if there is no parent window, it gets displayed at one plus the desktop's Z order, which is behind pretty much everything else.

I haven't tried this (because I don't have the source to the programs that annoy me with this behavior, and haven't written a test case), but I've wondered if a program that wants to display a message box, and hasn't yet displayed a window, would simply create a small centered window, and then display the message box, and on return from the message box, hide the small centered window (and exit?). Perhaps this would provide a better Z order to the MsgBox. The MsgBox doesn't take a parameter for its parent, so it would appear that Windows "intuits" its parent and/or its approriate Z order, from "environmental state", and my speculation is that creating a real window before the MsgBox might alter the "environmental state" sufficiently to make this work better?

I'm curious about any outcome you might find, if you try out my speculations.

--
Glenn -- http://nevcal.com/
===========================
The best part about procrastination is that you are never bored,
because you have all kinds of things that you should be doing.



Reply via email to