Sign in to follow this  
Followers 0
Influx

lock window in place

3 posts in this topic

how do i lock a window in place? like i know i can constantly update it and set its position but then users can still drag it up and it doesnt go back right away. how do i stop them from moving it.

Share this post


Link to post
Share on other sites



@Influx

Example:

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Const $SC_MOVE = 0xF010

$hGUI = GUICreate("Not moved GUI")
GUISetState()
GUIRegisterMsg($WM_SYSCOMMAND, "WM_SYSCOMMAND")

While GUIGetMsg() <> $GUI_EVENT_CLOSE
WEnd

Func WM_SYSCOMMAND($hWnd, $Msg, $wParam, $lParam)
    If BitAND($wParam, 0x0000FFF0) = $SC_MOVE Then Return False
    Return $GUI_RUNDEFMSG 
EndFunc

:)

Share this post


Link to post
Share on other sites

Thanks a LOT.

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  
Followers 0