Bunter Laufenderladebalken?

  • da du @progandy's UDF benutzt hast du es einfach:

    [autoit]

    _ProgressMarquee($Progress1)

    [/autoit]

    Hier einmal in einem Skript:

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <GDIPlus.au3>
    #Include <WinAPI.au3>
    #include <GDIpProgress.au3>

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

    Global $hGUI, $hImage, $hGraphic, $hImage
    Global Const $SC_DRAGMOVE = 0xF012
    Global $sImagePfad = @ScriptDir & "\", $i
    if not FileExists($sImagePfad&"beetle3.png") Then InetGet("http://www.autoit.de/index.php?page=Attachment&attachmentID=11994&h=0f539727a8792db143f431db6e1d5b5f4b1ab20a",$sImagePfad & "beetle3.png",1,0)
    _GDIPlus_StartUp()
    ; Load PNG image
    $hImage = _GDIPlus_ImageLoadFromFile($sImagePfad & "Beetle3.png")
    $iWidth = _GDIPlus_ImageGetWidth($hImage)
    $iHeight = _GDIPlus_ImageGetHeight($hImage)
    ConsoleWrite($iWidth & " / " & $iHeight)

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

    ; Create GUI
    $hGUI = GUICreate("Show PNG", $iWidth, $iHeight, 0,0, $WS_POPUP, $WS_EX_LAYERED)
    GUISetBkColor(0x01, $hGUI)
    $Progress1 = _ProgressCreate(20, $iHeight-85, 280, 27)
    _ProgressSetColors($Progress1, 0x09B8F8, 0x09B8F8, 0xFFFFFF, 0xFFFFFF)
    _ProgressSetFont($Progress1, "Courier New", 14)
    $Progress2 = _ProgressCreate(20, $iHeight-35, $iWidth-40, 27)
    _ProgressSetColors($Progress2, 0x09B8F8, 0x09B8F8, 0xFFFFFF, 0xFFFFFF)
    _ProgressSetFont($Progress2, "Courier New", 14)
    _ProgressSet($Progress2, 100)
    _ProgressMarquee($Progress1)
    GUISetState()
    _WinAPI_SetLayeredWindowAttributes($hGUI, 0x01, 0xFF, 3)

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

    $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI)
    _GDIPlus_GraphicsDrawImage($hGraphic, $hImage, 0, 0)

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

    #cs
    $Input1 = GUICtrlCreateInput("Input1", 156, 132, 121, 21)
    $Input2 = GUICtrlCreateInput("Input2", 156, 156, 121, 21)
    $Input3 = GUICtrlCreateInput("Input3", 156, 180, 121, 21)
    $Slider1 = GUICtrlCreateSlider(128, 212, 150, 45)
    $Button1 = GUICtrlCreateButton("Start", 208, 276, 75, 25)
    #ce

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

    GUIRegisterMsg($WM_PAINT, "MY_WM_PAINT")
    AdlibRegister("_IncProgress",1000)

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    ExitLoop
    Case $GUI_EVENT_PRIMARYDOWN
    _SendMessage($hGUI, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0)
    EndSwitch
    WEnd

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

    Func _IncProgress()
    if $i < 100 Then $i+=1
    ; _ProgressSet($Progress1, $i)
    _ProgressSet($Progress2, 100-$i)
    EndFunc
    #ce

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

    ; Clean up resources
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_ImageDispose($hImage)
    ;_ProgressDelete($Progress1)
    _GDIPlus_ShutDown()
    Exit

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

    ; Draw PNG image
    Func MY_WM_PAINT($hWnd, $Msg, $wParam, $lParam)
    _GDIPlus_GraphicsDrawImage($hGraphic, $hImage, 0, 0)
    _WinAPI_RedrawWindow($hGUI, 0, 0, 1)
    Return $GUI_RUNDEFMSG
    EndFunc

    [/autoit]

    mfg autoBert

  • Ah ok, ich habe die schon gesehen, dachte aber das Marquee für den Text ist (bei HTML ist das so ^^)
    Geht das vll auch so mit einem Schatten links und rechts?
    Halt so wie beim Windows7 der Effekt wenn so ein Balken da ist.