Posts: 1,006
Threads: 330
Joined: Mar 2007
Hi,
For some reason, when I use curtain function, the curtain only shows up as a slim bar (few pixels thick) on the left side of the second monitor (dual monitor setup).
Can't seem to figure out why, though I have played with some of the windows style settings for the dialog.
(Running Windows XP, dual video cards, Qm 2.3.0.1)
Any ideas?
Thanks, Stuart
Posts: 12,073
Threads: 140
Joined: Dec 2002
Macro
Curtain
_monitor=2; Curtain
5
Posts: 1,006
Threads: 330
Joined: Mar 2007
Thanks for replying Gintaras,
[code]_monitor=2; Curtain[code] worked for monitor 2 but I am still getting the monitor 1 curtain as a simple line along the left hand edge of monitor 2. It might have something to do with the nVidia nView Desktop Manager settings software since when I switched to a different profile in nView (e.g. Cad or Finance from Default), it makes it so that BOth _monitor=1 and _monitor=2 put the curtain up on monitor 2. Strange, there is something pushing things to the second monitor.
Anyone with same experience with nView Desktop Manager?
Stuart
Posts: 12,073
Threads: 140
Joined: Dec 2002
how with other dialogs?
for example
ShowText "" ""
_monitor=2; ShowText "" ""
Posts: 1,006
Threads: 330
Joined: Mar 2007
That works ok - one box in each monitor.
S
Posts: 1,006
Threads: 330
Joined: Mar 2007
The reason I am interested in Curtain is that I can't get Excel book.save to work as Save as Web Page function - and still remain hidden to user.
I have tried other strategies to avoid "ghost in machine" effect on user: hiding the window as soon as it comes up with window trigger or moving it offscreen but that makes it not possible to interact with application dialogs (filling save fields, hitting buttons, etc). Any strategies that people have had success with?
Stuart
Posts: 12,073
Threads: 140
Joined: Dec 2002
Try this
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)
Function
Curtain_dlg2
;\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
Macro
Curtain2
_monitor=2; Curtain2
5
Posts: 1,006
Threads: 330
Joined: Mar 2007
Thanks Gintaras - works perfectly....
One more thing (among the thousands I already owe you!!!!):
I tried to add my own jpg/bmp to the Curtain - which I was able to do successfully by adding the following to Curtain2
str sb3 = "$common documents$\sample.bmp"
and adding the str control "3"
in Curtain_Dlg2 I added:
3 Static 0x5400100E 0x20000 0 0 834 444 ""
the problem is that is shows up delayed a second or so compared to the blank background. Strange. Any thoughts?
Thanks so much.....!!!
Stuart
Posts: 12,073
Threads: 140
Joined: Dec 2002
Works well for me. I tested with about 300x300 jpg.
Posts: 1,006
Threads: 330
Joined: Mar 2007
Thanks!!!!! I will try on another system later.
Stuart