07-22-2008, 06:05 PM
Try this
Function Curtain2
Function Curtain_dlg2
Macro
Function Curtain2
;/
function# [$text]
;Covers screen while the macro is running.
;By default, covers only the primary monitor. To cover monitor 2, insert _monitor=2 before.
;Returns curtain window handle.
opt waitmsg 2
str controls="0"
str f=iif(len(text) text "Please wait ...")
ret ShowDialog("Curtain_dlg2" &Curtain_dlg2 &controls 0 1)
;\Dialog_Editor
function# hDlg message wParam lParam
;BEGIN DIALOG
;2 "" 0x00000000 0x88 0 0 227 154 "Please wait ..."
;END DIALOG
;DIALOG EDITOR: "" 0x2010505 "*" ""
;messages
sel message
,case WM_INITDIALOG
,SetWinStyle hDlg WS_EX_LAYERED|WS_EX_TRANSPARENT|WS_EX_NOACTIVATE 1|4
,SetLayeredWindowAttributes(hDlg 0xff 0 1)
,int x y w h; GetWorkArea x y w h 1 _monitor
,SetWindowPos hDlg HWND_TOPMOST x y w h SWP_SHOWWINDOW|SWP_NOACTIVATE