Button mag das bild nich :)

  • Huhu x),

    ich wollte ma nachfragen was an meinem script falsch sein soll^^ da er bei einem andren programm wunderbar geklappt hat nur jetzt läd er die button images nemmer =o

    [autoit]

    $Start = GUICtrlCreateButton("Start", 8, 489, 100, 25, 0)
    GUICtrlSetImage ($Start, @ScriptDir & '\Graphics\Buttons\Start.jpg')
    GUICtrlSetOnEvent ($Start, '_Patch')

    [/autoit]

    Lg

    ich

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

  • Auf einen Button kannst du nur Icon ( $BS_ICON ) oder Bitmaps (.bmp, $BS_BITMAP) draufmachen. GUICtrlCreatePic kann auch noch andere Formate.

  • könntest vllt. ma en beispiel machen ;)?

    problem is halt eben der sieht das
    $BS_ICON

    als variable an der keinen wert zugeteilt wurde :)

    Einmal editiert, zuletzt von Kasoki (13. Januar 2009 um 06:59)

  • Beispiel aus der Hilfe zu GuiCtrlSetImage ;)
    [autoit]

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

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

    Opt('MustDeclareVars', 1)

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

    Example()

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

    Func Example()
    Local $msg

    GUICreate("My GUI") ; will create a dialog box that when displayed is centered

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

    GUICtrlCreateButton("my picture button", 10, 20, 40, 40, $BS_ICON)
    GUICtrlSetImage(-1, "shell32.dll", 22)

    GUISetState()

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

    ; Run the GUI until the dialog is closed
    While 1
    $msg = GUIGetMsg()

    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd
    EndFunc ;==>Example

    [/autoit]