Jump to content

Recommended Posts

Posted

How do I detect when I grab the gui handle and move the window? I looked through all the functions and even tried google'ing it with no results.

  • Moderators
Posted

PRF,

Like this: :oops:

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

$hGUI = GUICreate("Test", 500, 500)

GUISetState()

GUIRegisterMsg($WM_MOVE, "_WM_MOVE")

While 1

    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch

WEnd

Func _WM_MOVE($hWnd, $iMsg, $wParam, $lParam)

    If $hWnd = $hGUI Then
        ConsoleWrite("Moving at " & @MSEC & @CRLF)
    EndIf

EndFunc

Al clear? :D

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Posted (edited)

Search WM_MOVE on the Forum and in the Help file.

Edit: Melba23 did one better than that :D

Edited by guinness

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

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
  • Recently Browsing   0 members

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