Infos zu Pic's

  • Wie bekomme ich die Position von einem Bestehenden Pic Raus?
    Beispiel:

    Spoiler anzeigen
    [autoit]


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

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

    #Region ### START Koda GUI section ### Form=
    $Form2 = GUICreate("Form2", 413, 298, 281, 173)
    $Pic1 = GUICtrlCreatePic(@WindowsDir & "\Angler.bmp", 3, 3, 128, 128)
    $Button1 = GUICtrlCreateButton("Button1", 333, 270, 75, 25, 0)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    $Pos = "Der String soll die Position des Pic1 ermitteln"
    MsgBox (0,"",$Pos)
    EndSwitch
    WEnd

    [/autoit]

    mfg. Jam00

    Einmal editiert, zuletzt von Jam00 (2. Januar 2009 um 13:48)

    • Offizieller Beitrag

    Nicht unbedingt mit _GUIImageList_GetImageInfoEx().

    [autoit]

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

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

    #Region ### START Koda GUI section ### Form=
    $Form2 = GUICreate("Form2", 413, 298, 281, 173)
    $Pic1 = GUICtrlCreatePic(@WindowsDir & "\Angler.bmp", 3, 3, 128, 128)
    $Button1 = GUICtrlCreateButton("Button1", 333, 270, 75, 25, 0)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    $Pos = ControlGetPos($Form2, '', $Pic1) ;"Der String soll die Position des Pic1 ermitteln"
    MsgBox (0,"",'X: ' & $Pos[0] & ', Y: ' & $Pos[1] & ', Breite: ' & $Pos[2] & ', Höhe: ' & $Pos[3])
    EndSwitch
    WEnd

    [/autoit]