Hallo Community
Ich habe eine Frage , wie kann ich mein GUI bewegen (im ganzen GUI) ,wenn ich die Linke Mausstaste gedrückt halte und die Maus bewege... ?
(wie in er caption)
mfg
Hallo Community
Ich habe eine Frage , wie kann ich mein GUI bewegen (im ganzen GUI) ,wenn ich die Linke Mausstaste gedrückt halte und die Maus bewege... ?
(wie in er caption)
mfg
Eine Möglichkeit wäre zum Beispiel diese hier
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
GUICreate("Test", 640, 480, -1, -1, $WS_POPUP)
GUICtrlCreateLabel('', 0, 0, 640, 480, -1, $GUI_WS_EX_PARENTDRAG)
GUICtrlCreateButton("hallo", 10, 10)
GUICtrlCreateLabel('kölkölk', 0220, 0, 640, 480, -1)
GUISetState()
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
Dies erfolgt mit einem Label, welches die komplette GUI abdeckt
wie macht man das hier;
[autoit]#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Form2", 316, 283, 303, 185, BitOR($WS_MINIMIZEBOX,$WS_SYSMENU,$WS_POPUP,$WS_GROUP,$WS_CLIPSIBLINGS))
$Pic1 = GUICtrlCreatePic("C:\Dokumente und Einstellungen\Admin\Desktop\Projekt Neu\Main\spawns\12.jpg", 0, 0, 334, 300, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Button1 = GUICtrlCreateButton("zurück", 0, 0, 75, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
[/autoit][autoit][/autoit][autoit]$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Do
EndSwitch
WEnd
Einfach bei GUICtrlCreatePic den EX-Style "$GUI_WS_EX_PARENTDRAG" einfügen (hinter das BitOr() )
Also so
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Form2", 316, 283, 303, 185, BitOR($WS_MINIMIZEBOX,$WS_SYSMENU,$WS_POPUP,$WS_GROUP,$WS_CLIPSIBLINGS))
$Pic1 = GUICtrlCreatePic("C:\Dokumente und Einstellungen\\Desktop\Projekt Neu\Main\spawns\12.jpg", 0, 0, 334, 300, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS),$GUI_WS_EX_PARENTDRAG)
$Button1 = GUICtrlCreateButton("zurück", 0, 0, 75, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
[/autoit] [autoit][/autoit] [autoit]$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd