Bild als Button

  • Klar
    Einfach ganz normal mit GUIGetMsg
    Oder mit _GUICtrlButton_SetImage

    Edit: zu späääät ^^

    Spoiler anzeigen

    Grundkenntnisse in: C++, JavaScript
    Sehr gute Kenntnisse: PHP, JAVA, C und näturlich AutoIt


    Klaviatur, Anhang UDF, GDI+ Mühle

    Zitat

    "Wenn einen um 20h der Pizzadienst anruft und fragt, ob man's nur vergessen hat und ob man das gleiche
    möchte wie immer -- dann sollte man sein Bestellverhalten evtl überdenken"

  • jo geht:

    Spoiler anzeigen
    [autoit]

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

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

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 633, 447, 192, 124)
    $Group1 = GUICtrlCreateGroup("Bild ist hier drin!", 128, 48, 473, 321)
    $Pic1 = GUICtrlCreatePic("", 136, 64, 460, 300, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
    GUICtrlCreateGroup("", -99, -99, 1, 1);irrelevant, nur damit man weiß wo das bild ist!
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Pic1
    ;deine func
    MsgBox(0,"","")
    EndSwitch
    WEnd

    [/autoit]

    Edit\\ zu spät, dafür mit beispiel^^

  • So :

    [autoit]

    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 254, 162, 192, 124)
    $Pic1 = GUICtrlCreatePic(@scriptdir & "\Image\bild.jpg", 0, 0, 252, 148, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Pic1
    MsgBox(0,"","")

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

    EndSwitch
    WEnd

    [/autoit]


    EDIT: Auch zu spät :D