Progress Vista

  • Hallo nochmal! Und mein nächstes Problem :)

    Normalerweise ist der Progress bei Vista ja grün, doch im Arbeitsplatz kann der durchaus auch rot sein. Ich habe nachgeforscht, und herausgefunden, dass es als Farben für Aero Grün, Gelb, Rot und Blau gibt. Grün ist Standard, Rot tritt bei Fehlern auf, gelb in Pausen und blau wenn ein Balken nicht ganz gefüllt ist o.ä.

    Wie kann ich Vista einen Fehler bzw. eine Pause "vorgaukeln", damit sich der Progress verfärbt?

    Danke schon mal im Voraus :)

    Einmal editiert, zuletzt von MatthiasG. (20. Mai 2009 um 16:31)

  • Danke sehr! :)

    Aber wie kriege ich die Konstanten $PBST_ERROR und $PBST_PAUSED hin? Oder gibt es die schon?

  • Achso! Man kann die einfach so übernehmen? Dankeschön, das hilft mir sehr weiter :thumbup:

  • Leider funktioniert es weder mit SetStyle noch so:

    [autoit]

    Global Const $WM_USER = 0x400
    Global Const $PBM_SETSTATE = $WM_USER + 16
    Global Const $PBST_NORMAL = 0x0001
    Global Const $PBST_ERROR = 0x0002
    Global Const $PBST_PAUSED = 0x0003

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

    #include <GUIConstantsEx.au3>
    #include <SendMessage.au3>

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

    GUICreate("test", 300, 300)
    GUICtrlCreateGroup("Mit Text", 25, 25, 200, 100)
    GUICtrlCreateGroup("", 25, 150, 200, 100)
    $pro = GUICtrlCreateProgress(50, 50, 200, 20)
    _SendMessage(GUICtrlGetHandle($pro), $PBM_SETSTATE)
    _SendMessage(GUICtrlGetHandle($pro), $PBST_ERROR)
    $pro2 = GUICtrlCreateProgress(50, 150, 200, 20)
    GUICtrlSetBkColor(-1, 0xffffff)
    GUICtrlSetColor(-1, 0x0000ff)
    GUISetState()

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

    Do
    Sleep(100)
    GUICtrlSetData($pro, GUICtrlRead($pro) + 10)
    GUICtrlSetData($pro2, GUICtrlRead($pro2) + 10)
    Until GUIGetMsg() = $GUI_EVENT_CLOSE

    [/autoit]
    • Offizieller Beitrag

    Probier es mal so ;)

    Spoiler anzeigen
    [autoit]

    Global Const $WM_USER = 0x400
    Global Const $PBM_SETSTATE = $WM_USER + 16
    Global Const $PBST_NORMAL = 0x0001
    Global Const $PBST_ERROR = 0x0002
    Global Const $PBST_PAUSED = 0x0003

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

    #include <GUIConstantsEx.au3>
    #include <SendMessage.au3>

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

    GUICreate("test", 300, 300)
    GUICtrlCreateGroup("Mit Text", 25, 25, 200, 100)
    GUICtrlCreateGroup("", 25, 150, 200, 100)
    $pro = GUICtrlCreateProgress(50, 50, 200, 20)
    _SendMessage(GUICtrlGetHandle($pro), $PBM_SETSTATE,$PBST_ERROR)
    ;~ _SendMessage(GUICtrlGetHandle($pro), $PBST_ERROR)
    $pro2 = GUICtrlCreateProgress(50, 150, 200, 20)
    GUICtrlSetBkColor(-1, 0xffffff)
    GUICtrlSetColor(-1, 0x0000ff)
    GUISetState()

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

    Do
    Sleep(100)
    GUICtrlSetData($pro, GUICtrlRead($pro) + 10)
    GUICtrlSetData($pro2, GUICtrlRead($pro2) + 10)
    Until GUIGetMsg() = $GUI_EVENT_CLOSE

    [/autoit]
  • Ok, danke! Das blaue siehst du, wenn du auf Computer klickst, und dir die Festplatten anschaust :P