Bild als GUI

  • [autoit]

    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>

    [/autoit][autoit][/autoit][autoit][/autoit][autoit]

    $MainGUI=GUICreate("",150,270,-1,-1,$WS_POPUP)
    GUICtrlCreatePic(@ScriptDir&"\iPhone.png",0,0,150,270)
    GUICtrlSetState(-1,$GUI_DISABLE)
    GUISetState()

    [/autoit][autoit][/autoit][autoit]

    While 1
    $msg=GUIGetMsg()
    Switch $msg
    Case $GUI_EVENT_CLOSE
    Exit
    EndSwitch
    WEnd

    [/autoit]

    Edit: Kannst ja das untere wegschneiden und die Ecken noch Runden, sieht es besser aus:

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $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()

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $msg=GUIGetMsg()
    Switch $msg
    Case $GUI_EVENT_CLOSE
    Exit
    EndSwitch
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    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

    [/autoit]