Jump to content
Sign in to follow this  
Influx

lock window in place

Recommended Posts

Influx

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
rasim

@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

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.