Jump to content
Sign in to follow this  

Way to freeze/unfreeze the desktop?

Recommended Posts


I have an application window that performs a series of operations (minimize ... call another window ... send keys ... then restore).  Although the operations accomplish what they need to, the visual effect is less than ideal.

Is there a way to freeze the display ... perform the window operations ... and then unfreeze when everything is back in place?  

Thanks in advance for any help.





Share this post

Link to post
Share on other sites

If it is a program window you can hide it and still use controllComand() to send the messages. .

If it is IE then the same can be accomplished with IE.au3.



Share this post

Link to post
Share on other sites

Thanks for your response.

I just tried a hide/show combination for my main GUI and it seems the same as the minimize/restore I was using.  (BTW, window animation is off).

What I was trying for is that the result of the operation would "just appear" ... with my main GUI still on top ... and without the user seeing any intermediate window changes.  IOW, I'm hoping windows+au3 has another trick in there somewhere ... like "suspend display refresh".

Do you know of anything like that?

Share this post

Link to post
Share on other sites

How about this?  It will display a GUI that is always on top and cannot be moved.

#include <GUIConstants.au3>

Global Const $WM_WINDOWPOSCHANGING = 0x0046

Global $nConstXpos = @DesktopWidth/4        ;define the constant x position
Global $nConstYpos = @DesktopHeight/4   ;define the constant y position

$hGUI = GUICreate("Unmovable window", 600, 400, $nConstXpos, $nConstYpos)
WinSetOnTop($hGUI, "", 1)


While 1
    $GUIMsg = GUIGetMsg()

    Switch $GUIMsg
        Case $GUI_EVENT_CLOSE

Func MY_WM_WINDOWPOSCHANGING($hWnd, $Msg, $wParam, $lParam)
    Local $stWinPos = DllStructCreate("uint hwnd;uint hwndInsertAfter;int x;int y;int cx;int cy;uint flags", $lParam)

    DllStructSetData($stWinPos, "x", $nConstXpos)
    DllStructSetData($stWinPos, "y", $nConstYpos)
    Return 0

I can not remember whos code this is.  But I would like to thank them anyway.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this