Hallo,
ich möchte dieses Bild:
[Blockierte Grafik: http://sebastianhomeier.de/imagehoster/images/thumbs/thumbnail_4047287221_Unbenannt.png]
als GUI haben. Wie geht das? Mir wer am liebsten ein Code beispiel.
LG jakolo
Hallo,
ich möchte dieses Bild:
[Blockierte Grafik: http://sebastianhomeier.de/imagehoster/images/thumbs/thumbnail_4047287221_Unbenannt.png]
als GUI haben. Wie geht das? Mir wer am liebsten ein Code beispiel.
LG jakolo
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$MainGUI=GUICreate("",150,270,-1,-1,$WS_POPUP)
GUICtrlCreatePic(@ScriptDir&"\iPhone.png",0,0,150,270)
GUICtrlSetState(-1,$GUI_DISABLE)
GUISetState()
While 1
$msg=GUIGetMsg()
Switch $msg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Edit: Kannst ja das untere wegschneiden und die Ecken noch Runden, sieht es besser aus:
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$MainGUI=GUICreate("",150,258,-1,-1,$WS_POPUP)
GUICtrlCreatePic(@ScriptDir&"\iPhone.png",0,0,150,270)
GUICtrlSetState(-1,$GUI_DISABLE)
_GuiRoundCorners($MainGUI,0,0,40,40)
GUISetState()
While 1
$msg=GUIGetMsg()
Switch $msg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func _GuiRoundCorners($hWnd, $x1, $y1, $x3, $y3)
Local $pos, $ret, $ret2
$pos = WinGetPos($hWnd)
$ret = DllCall('gdi32.dll', 'long', 'CreateRoundRectRgn', 'long', $x1, 'long', $y1, 'long', $pos[2], 'long', $pos[3], 'long', $x3, 'long', $y3)
If $ret[0] Then
$ret2 = DllCall('user32.dll', 'long', 'SetWindowRgn', 'hwnd', $hWnd, 'long', $ret[0], 'int', 1)
If $ret2[0] Then
Return 1
Else
Return 0
EndIf
Else
Return 0
EndIf
EndFunc
Ah super danke das erste wusste ich schon aber das Mit dem ecken beschneiden nicht. danke!