joa ist recht einfach, hatte dazu mal was im inet gefunden.
Code:
#include <StaticConstants.au3>
#include <ListviewConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <SliderConstants.au3>
#Include <GuiListView.au3>
#Include <Array.au3>
#Include <File.au3>
#Include <Misc.au3>
Opt("GUIOnEventMode", 1)
$hGUI = GUICreate("Transparent", 575, 510)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Ex")
$insert = GuiCtrlCreateButton("Insert Pic" ,10,10)
GuiCtrlSetOnEvent(-1, "_insert")
$Pic=GUICtrlCreatePic("", 50, 50)
GuiCtrlSetOnEvent(-1, "_DragMe")
$hsplitter1 = GUICtrlCreateLabel("",270, 125, 8, 205,-1,$SS_BLACKFRAME)
GUICtrlSetOnEvent($hsplitter1,"_DragMe")
$hlabel = GUICtrlCreateLabel("Verschieb mich",20,120,100,25)
GUICtrlSetOnEvent($hlabel,"_DragMe")
GUISetState(@SW_SHOW)
While 1
sleep(100)
WEnd
Func _insert()
GuiCtrlDelete($pic)
$bild = FileOpenDialog("Wählen Sie eine Datei aus!", @WindowsDir & "\", "Bilder (*.jpg;*.bmp)", 1 + 4 )
$Pic = GUICtrlCreatePic($bild, 150, 150)
GuiCtrlSetOnEvent(-1, "_DragMe")
EndFunc
Func _DragMe() ;Orginal zum verschieben von 1 Bild von ChaosKeks
Local $Pos_C, $Pos_M, $Pos_M2, $Opt_old
Local $dll = DllOpen("user32.dll")
$Opt_old = Opt('MouseCoordMode', 0)
$Pos_C = ControlGetPos($hGui, "", @GUI_CtrlId);$pic)
$Pos_M = MouseGetPos()
$Pos_W = WinGetPos($hGui)
$x_Offset = $Pos_M[0] - $Pos_C[0]
$y_Offset = $Pos_M[1] - $Pos_C[1]
_MouseTrap($Pos_W[0]+$x_Offset,$Pos_W[1]+$y_Offset,$Pos_W[0]+$Pos_W[2],$Pos_W[1]+$Pos_W[3])
While _IsPressed('01', $dll)
$Pos_M = MouseGetPos()
If $Pos_M <> $Pos_M2 Then
GUICtrlSetPos(@GUI_CtrlId,$Pos_M[0] - $x_Offset, $Pos_M[1] - $y_Offset)
sleep(10)
EndIf
$Pos_M = $Pos_M2
sleep(50)
WEnd
DllClose($dll)
Opt('MouseCoordMode', $Opt_old)
_MouseTrap()
EndFunc
Func _Ex()
Exit
EndFUnc
wenn alle deine controls soweit gesetzt sind kannst du die positionen mit controlgetpos auslesen und hochrechnen.