Sign in to follow this  
Followers 0
anixon

GUI Progress Control

5 posts in this topic

When using 'GuiCtrlCreateProgress' is it possible to change the 0 to 100 progressive bar display in this feature from say 'Green" to say 'Red'. I have tried this which of course does not work

CODE
#include <GuiConstants.au3>

$wait = 100

$i = 0

GuiCreate("Progress Bar", 400, 400)

GuiSetState()

While 1

$progressbar = GuiCtrlCreateProgress(60, 80, 150, 20)

GUICtrlSetColor(-1,0xff0000) ; Red

For $i + $i to 100

GUICtrlSetData ($progressbar,$i)

sleep($wait)

If $i = 100 Then

$i = 0

ExitLoop

EndIf

Next

WEnd

While GuiGetMsg() <> $GUI_EVENT_CLOSE

WEnd

Assistance would be appreciated

Cheers Ant... :whistle:

Share this post


Link to post
Share on other sites



Quoted from the HelpFile

Progress controls cannot be painted if the "Windows XP style" is used.

Share this post


Link to post
Share on other sites

Quoted from the HelpFile

I am not sure what Windows XP Stype means. Does it mean that it does not work in Windows XP?

Cheers

Ant..

Share this post


Link to post
Share on other sites

I am not sure what Windows XP Stype means. Does it mean that it does not work in Windows XP?

Cheers

Ant..

Right Click anywhere on you desktop, and in the menu, open "Properties"

In the "themes" tab, You will find a theme, most likely "Windows XP"

Share this post


Link to post
Share on other sites

Right Click anywhere on you desktop, and in the menu, open "Properties"

In the "themes" tab, You will find a theme, most likely "Windows XP"

Thanks for that I changed my theme to Windows Classic and when running the script got the 'Red" Bar. I am sorry for the next question but what would be the code to change from the Windows XP theme to Windows Classic for the time that the progress bar

is to be displayed in 'Red' and then back to the Windows XP theme after that processing is completed?

Cheers Ant..

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0