GeekS Posted August 12, 2008 Share Posted August 12, 2008 What i want to do, is to make this GUI window drag-able from mouseclicking(draging) the background/image. GUICreate("Gnu's little helper", x1, y1, x2, y2, BitOR($WS_POPUP,$WS_BORDER)) GUICtrlCreatePic(@WorkingDir & "\Images\XY", 0, 0, x1, y1) Adding $GUI_WS_EX_PARENTDRAG like this does not work: GUICreate("Gnu's little helper", x1, y1, x2, y2, BitOR($WS_POPUP,$WS_BORDER)) GUICtrlCreatePic(@WorkingDir & "\Images\XY", 0, 0, x1, y1, "", $GUI_WS_EX_PARENTDRAG) Thanks in advance, Gnu / GeekS. Link to comment Share on other sites More sharing options...
Dampe Posted August 12, 2008 Share Posted August 12, 2008 GUICreate("Gnu's little helper", x1, y1, x2, y2, BitOR($WS_POPUP,$WS_BORDER)) GUICtrlCreatePic(@WorkingDir & "\Images\XY", 0, 0, x1, y1) GUICtrlSetState (-1, $GUI_DISABLE) GUIRegisterMsg($WM_NCHITTEST, "WM_NCHITTEST") Func WM_NCHITTEST($hWnd, $Msg, $wParam, $lParam) Local $iProc $iProc = DllCall("user32.dll", "int", "DefWindowProc", "hwnd", $hWnd, "int", $Msg, "wparam", $wParam, "lparam", $lParam) $iProc = $iProc[0] If $iProc = $HTCLIENT Then Return $HTCAPTION Return $GUI_RUNDEFMSG EndFunc Link to comment Share on other sites More sharing options...
martin Posted August 12, 2008 Share Posted August 12, 2008 What i want to do, is to make this GUI window drag-able from mouseclicking(draging) the background/image. GUICreate("Gnu's little helper", x1, y1, x2, y2, BitOR($WS_POPUP,$WS_BORDER)) GUICtrlCreatePic(@WorkingDir & "\Images\XY", 0, 0, x1, y1) Adding $GUI_WS_EX_PARENTDRAG like this does not work: GUICreate("Gnu's little helper", x1, y1, x2, y2, BitOR($WS_POPUP,$WS_BORDER)) GUICtrlCreatePic(@WorkingDir & "\Images\XY", 0, 0, x1, y1, "", $GUI_WS_EX_PARENTDRAG) Thanks in advance, Gnu / GeekS. This works for me #include <GuiConstantsex.au3> #include <windowsconstants.au3> GUICreate("Gnu's little helper",200, 200, 200,200, BitOR($WS_POPUP,$WS_BORDER)) GUICtrlCreatePic(@Systemdir & "\oobe\images\mslogo.jpg", 0, 0, 200,200, -1, $GUI_WS_EX_PARENTDRAG) GUISetState() while 1 sleep(30) WEnd Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. 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