GaryFrost Posted May 6, 2005 Share Posted May 6, 2005 expandcollapse popup#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. Link to comment Share on other sites More sharing options...
layer Posted May 6, 2005 Share Posted May 6, 2005 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 Link to comment Share on other sites More sharing options...
GaryFrost Posted May 6, 2005 Author Share Posted May 6, 2005 (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 May 6, 2005 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. Link to comment Share on other sites More sharing options...
buzz44 Posted May 7, 2005 Share Posted May 7, 2005 (edited) Only works on Windows XP Style Theme or Classic. Doesn't work on any of my 'Windows Blind's' Theme. Edited May 7, 2005 by Burrup qq Link to comment Share on other sites More sharing options...
Lazycat Posted May 7, 2005 Share Posted May 7, 2005 Very nice script. But why you use custom _SetBarColor instead internal GUICtrlSetColor? Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s]) Link to comment Share on other sites More sharing options...
GaryFrost Posted May 7, 2005 Author Share Posted May 7, 2005 Very nice script. But why you use custom _SetBarColor instead internal GUICtrlSetColor?<{POST_SNAPBACK}>I was just messing around with progressbar messages. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
dash007 Posted July 19, 2005 Share Posted July 19, 2005 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. Link to comment Share on other sites More sharing options...
Lazycat Posted July 19, 2005 Share Posted July 19, 2005 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. Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s]) Link to comment Share on other sites More sharing options...
GaryFrost Posted July 19, 2005 Author Share Posted July 19, 2005 PBS_MARQUEE Version 6.0 or later. The progress bar moves like a marquee. Note Comctl32.dll version 6 is not redistributable but it is included in Microsoft Windows XP or later. Gary SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now