Jump to content

Recommended Posts

Posted

#include <GUIConstants.au3>

Const $PBS_MARQUEE = 0x08 

GUICreate("My GUI Marque Bar",220,100, 100,200)
GUICtrlSetColor(-1,32250); not working with Windows XP Style
$MarqueBar = GUICtrlCreateProgress (0,80,220,20,$PBS_MARQUEE)
$start = GUICtrlCreateButton ("Start",75,25,70,20)
$stop = GUICtrlCreateButton ("Stop",75,50,70,20)
GUISetState ()


Global $i = 0

do
    $msg = GUIGetMsg()
    Select
        Case $msg = $start
            $i = 0
            $stage = 1
            _SetBarColor($MarqueBar,0x0000FF)
            AdlibEnable("Marque",100)
        Case $msg = $stop
            AdlibDisable()
    EndSelect
until $msg = $GUI_EVENT_CLOSE

Func _SetBarColor($h_wnd, $i_ColorRef)
    Const $WM_USER = 0x400
    Const $PBM_SETBARCOLOR = ($WM_USER+9)
    GUICtrlSendMsg($h_wnd, $PBM_SETBARCOLOR, 0, Int($i_ColorRef))
EndFunc

Func Marque()
    If $i >= 33 And $i <= 66 And $stage == 1 Then 
        _SetBarColor($MarqueBar,0xFFFFFF)
        $stage = 2
    ElseIf $i > 66 and $stage = 2 Then 
        _SetBarColor($MarqueBar,0xA00000)
        $stage = 3
    ElseIf $i >= 100 Then
        _SetBarColor($MarqueBar,0x0000FF)
        $stage = 1
        $i = 0
    EndIf
    $i += 1
    GUICtrlSetData ($MarqueBar,(100 - $i))
EndFunc

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Posted

This is great! I've always wondered how I would make this kind of porgress bar... Like when windows starts up :( Good work, me like! : Oh yea, it also requires latest BETA :(

FootbaG
Posted (edited)

This is great! I've always wondered how I would make this kind of porgress bar... Like when windows starts up :( Good work, me like! : Oh yea, it also requires latest BETA :(

<{POST_SNAPBACK}>

Why would it require latest beta?

Both the GUICtrlCreateProgress and GUICtrlSendMsg exist in current release.

Would just need to change 1 line of code $i += 1 to $i = $i + 1

Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Posted (edited)

Only works on Windows XP Style Theme or Classic. Doesn't work on any of my 'Windows Blind's' Theme.

Edited by Burrup

qq

  • 2 months later...
Posted

This progress bar works fine on XP, but I am unable to get it working on NT the way it works on XP. Anyone have any ideas? I like the way the progress bar runs on XP.

Posted

This progress bar works fine on XP, but I am unable to get it working on NT the way it works on XP. Anyone have any ideas? I like the way the progress bar runs on XP.

<{POST_SNAPBACK}>

PBS_MARQUEE is style that first appears only in the version 6 of comctl32.dll - in the XP. Not sure that you can use it on the prior OS verions.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...