Hintergrundbild

  • Hi leute weiß jemand wie ich ein Pic in den HIntergrund setzen kann?

    Beispiel
    [autoit]

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

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

    #Region ### START Koda GUI section ###
    $INC = GUICreate("INC", 454, 524, 705, 245,$WS_POPUP)
    GUISetIcon("D:\005.ico")
    GUISetFont(8, 400, 0, "Arial")
    $Pic1 = GUICtrlCreatePic(@scriptdir & "\Hintergrund-1.gif", 0, 0, 454, 524)
    GUISetBkColor(0x0054E3)
    $Edit2 = GUICtrlCreateEdit("", 3, 405, 449, 89, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN,$WS_VSCROLL))
    GUICtrlSetData(-1, "Edit2")
    GUICtrlSetFont(-1, 10, 400, 0, "Arial")
    $Input1 = GUICtrlCreateInput("Input1", 3, 384, 448, 22, BitOR($ES_CENTER,$ES_AUTOHSCROLL), 0)
    GUICtrlSetBkColor(-1, 0x3D95FF)
    $Edit1 = GUICtrlCreateEdit("", 6, 51, 443, 332)
    GUICtrlSetData(-1, "Edit1")
    $Pic2 = GUICtrlCreatePic(@scriptdir & "Senden.bmp", 375, 495, 75, 25)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###
    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Pic2
    GUICtrlSetImage ($Pic2,@scriptdir & "Senden-2.bmp")
    Sleep (100)
    GUICtrlSetImage ($Pic2@scriptdir & "Senden.bmp")
    EndSwitch
    WEnd

    [/autoit]

    Du dann wollte ich noch wissen wie ich es mache, das der Button erst wieder zurückgesetzt wird wenn ich mit der maus nicht mehr draufklicke

    mfg. Jam00

    Einmal editiert, zuletzt von peethebee (19. Januar 2009 um 21:13)

    • Offizieller Beitrag

    Hilfe:

    Zitat von Hilfe

    If a picture is set as a background picture, as the other controls will overlap, it's important to disable the pic control and create it after the others controls: GuiCtrlSetState(-1,$GUI_DISABLE). This is not enough for Tab or Listview control which behave differently. In this case you need to create the picture with the $WS_CLIPSIBLINGS style, GuiCtrlSetState(-1,$GUI_ONTOP) is necessary for the Tab or Listview control.

    http://www.autoitscript.com/autoit3/docs/f…rlCreatePic.htm

    peethebee