Hi Guys To achieve the same thing I have used Win32::GUI::MessageBox Note: The code below is exerts from my script and I can not guarantee that It works as shown, but the message box does seem to do what you require.
use Win32::GUI; use Win32(); $warnText = "You must enter an Id number to find"; $warnTitle = "ID Missing"; $warnIcon = MB_ICONWARNING; $warnButtons = MB_OK; myMsgBox(); sub myMsgBox { Win32::GUI::MessageBox( 0, $warnText, $warnTitle, $warnIcon | $warnButtons | MB_TASKMODAL, ); } for a discprition of Message box as taken from the Win32::GUI Documentation (Packages) by Aldo Calpini Ver: 1.0, 12 Nov 2004 MessageBox([HANDLE], TEXT, [CAPTION], [TYPE]) Shows a standard Windows message box and waits for the user to dismiss it. You can set the window that the message box corresponds to by passing a specific HANDLE (window handle or object). The given TEXT will appear in the message box client area, and the given CAPTION text will appear in the message box titlebar. TYPE specifies various flags that change the appearance of the message box. These are: To set which buttons appear on the message box, specify one of the following values: 0x0000 MB_OK show an OK button 0x0001 MB_OKCANCEL show an OK button and a Cancel button 0x0002 MB_ABORTRETRYIGNORE show Abort, Retry and Ignore buttons 0x0003 MB_YESNOCANCEL show Yes, No and Cancel buttons 0x0004 MB_YESNO show Yes and No buttons 0x0005 MB_RETRYCANCEL show Retry and Cancel buttons 0x0006 MB_CANCELTRYCONTINUE show Cancel, Try Again and Continue buttons (2000/XP only) To add a help button to the message box, specify the following value: 0x4000 MB_HELP To show an icon in the message box, specify one of these values: 0x0010 MB_ICONHAND show a stop-sign icon (used for errors) 0x0020 MB_ICONQUESTION show a question mark icon 0x0030 MB_ICONEXCLAMATION show an exclamation mark icon (used for warnings) 0x0040 MB_ICONASTERISK show an asterisk icon (the letter "i" in a circle) (used for information) To set a default button, specify one of these values (if none of these are specified, the first button will be the default button): 0x0100 MB_DEFBUTTON2 The second button is default 0x0200 MB_DEFBUTTON3 The third button is default 0x0300 MB_DEFBUTTON4 The fourth button is default To specify how the message box affects other windows and various other flags, use one or more of the following values: 0x0000 MB_APPLMODAL The user must dismiss the message box before continuing work in the window specified by HANDLE (this is the default) 0x1000 MB_SYSTEMMODAL Same as MB_APPLMODAL but the window appears on top of all other windows on the desktop. 0x2000 MB_TASKMODAL Same as MB_APPLMODAL except that all the top-level windows belonging to the current thread are disabled if no HANDLE is specified 0x8000 MB_NOFOCUS Does not give the message box input focus 0x10000 MB_SETFOREGROUND Makes the message box become the foreground window 0x20000 MB_DEFAULT_DESKTOP_ONLY If the current desktop is not the default desktop, MessageBox will not return until the user switches to the default desktop 0x40000 MB_TOPMOST Makes the message box become the topmost window 0x80000 MB_RIGHT Makes text in the message box right-aligned 0x100000 MB_RTLREADING Displays message and caption text using right-to-left reading order on Hebrew and Arabic systems. 0x200000 MB_SERVICE_NOTIFICATION Displays the message box even if no user is logged in on Windows NT/2000/XP. You should not specify a HANDLE when using this. To combine several values together, use a bitwise OR operator (|). MessageBox will return one of the following values depending on the user's action: 1 IDOK The user clicked the OK button. 2 IDCANCEL The user clicked the Cancel button. 3 IDABORT The user clicked the Abort button. 4 IDRETRY The user clicked the Retry button. 5 IDIGNORE The user clicked the Ignore button. 6 IDYES The user clicked the Yes button. 7 IDNO The user clicked the No button. 8 IDCLOSE The user closed the message box. 9 IDHELP The user clicked the Help button. 10 IDTRYAGAIN The user clicked the Try Again button. 11 IDCONTINUE The user clicked the Continue button. The default TYPE value is a warning icon with an OK button (MB_ICONEXCLAMATION|MB_OK). Hope this Helps Regards Ross Clunie