Reddragon Posted November 5, 2014 Share Posted November 5, 2014 Well i have created a popup form and want to move the form by using a picture on the form.How do I do it? I have written a code but its not working #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 615, 438, 192, 146, $WS_POPUP, 0) $Pic1 = GUICtrlCreatePic("", 40, 56, 337, 161, 0, $GUI_WS_EX_PARENTDRAG) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Link to comment Share on other sites More sharing options...
Solution nend Posted November 5, 2014 Solution Share Posted November 5, 2014 Do you mean this? #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 615, 438, 192, 146, $WS_POPUP, 0) $Pic1 = GUICtrlCreatePic("", 40, 56, 337, 161, 0, $GUI_WS_EX_PARENTDRAG) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### GUIRegisterMsg($WM_NCHITTEST, "Dragwindow") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func Dragwindow($hWnd, $iMsg, $iwParam, $ilParam) If $iMsg = $WM_NCHITTEST Then Return $HTCAPTION EndIf EndFunc Reddragon 1 Link to comment Share on other sites More sharing options...
Reddragon Posted November 6, 2014 Author Share Posted November 6, 2014 Do you mean this? #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 615, 438, 192, 146, $WS_POPUP, 0) $Pic1 = GUICtrlCreatePic("", 40, 56, 337, 161, 0, $GUI_WS_EX_PARENTDRAG) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### GUIRegisterMsg($WM_NCHITTEST, "Dragwindow") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func Dragwindow($hWnd, $iMsg, $iwParam, $ilParam) If $iMsg = $WM_NCHITTEST Then Return $HTCAPTION EndIf EndFunc YEs. Thanks mate Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now