Jump to content

Way to freeze/unfreeze the desktop?


qwert
 Share

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.

 

 

 

 

Link to comment
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?

Link to comment
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)
GUIRegisterMsg($WM_WINDOWPOSCHANGING, "MY_WM_WINDOWPOSCHANGING")

GUISetState()

While 1
    $GUIMsg = GUIGetMsg()

    Switch $GUIMsg
        Case $GUI_EVENT_CLOSE
            ExitLoop
    EndSwitch
WEnd


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
EndFunc

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...