Jump to content

Taskbar progressbar (windows 7)


Recommended Posts

It's not the easiest thing, but do a search for ITaskBarList and you'll get some examples. looks useful.

thanks, it has the progress bar in the taskbar :)

Heroes, there is no such thing

One day I'll discover what IE.au3 has of special for so many users using it.
C'mon there's InetRead and WinHTTP, way better
happy.png

Link to post
Share on other sites

works great :)

Its possible change the colour of a normal progress bar? (to yellow, red, in case of abort state)

Heroes, there is no such thing

One day I'll discover what IE.au3 has of special for so many users using it.
C'mon there's InetRead and WinHTTP, way better
happy.png

Link to post
Share on other sites

works great Posted Image

Its possible change the colour of a normal progress bar? (to yellow, red, in case of abort state)

Use the below function to change the color (State).

; 1 = Normal(Green Color), 2 = Error(Red Color) 3 = Pause(Yellow Color)
Func _SetProgressBar_Color($iProgressBarId, $iState)
If @OSBuild < 6000 Then Return SetError(1,0,0); Only works on vista/server08 or higher
_SendMessage(GUICtrlGetHandle($iProgressBarId),0x400 + 16,$iState,0); $PBM_SETSTATE (WM_USER + 16)
EndFunc
Link to post
Share on other sites

Use the below function to change the color (State).

; 1 = Normal(Green Color), 2 = Error(Red Color) 3 = Pause(Yellow Color)
Func _SetProgressBar_Color($iProgressBarId, $iState)
If @OSBuild < 6000 Then Return SetError(1,0,0); Only works on vista/server08 or higher
_SendMessage(GUICtrlGetHandle($iProgressBarId),0x400 + 16,$iState,0); $PBM_SETSTATE (WM_USER + 16)
EndFunc

yeah, works :)

but looses the $PBS_SMOOTH ;)

EDIT: this can be implemented with dllcall?:

HWND hWnd = m_Progress.GetSafeHwnd();
::SetWindowTheme(hWnd, NULL, NULL);
m_Progress.StepIt();
Edited by DiOgO

Heroes, there is no such thing

One day I'll discover what IE.au3 has of special for so many users using it.
C'mon there's InetRead and WinHTTP, way better
happy.png

Link to post
Share on other sites

yeah, works Posted Image

but looses the $PBS_SMOOTH Posted Image

EDIT: this can be implemented with dllcall?:

HWND hWnd = m_Progress.GetSafeHwnd();
::SetWindowTheme(hWnd, NULL, NULL);
m_Progress.StepIt();

Try adding $PBS_SMOOTH to the function like below:

; 1 = Normal(Green Color), 2 = Error(Red Color) 3 = Pause(Yellow Color)
Func _SetProgressBar_Color($iProgressBarId, $iState)
If @OSBuild < 6000 Then Return SetError(1,0,0); Only works on vista/server08 or higher
_SendMessage(GUICtrlGetHandle($iProgressBarId),0x400 + 16 + $PBS_SMOOTH,$iState,0); $PBM_SETSTATE (WM_USER + 16)
EndFunc
Link to post
Share on other sites

Try adding $PBS_SMOOTH to the function like below:

; 1 = Normal(Green Color), 2 = Error(Red Color) 3 = Pause(Yellow Color)
Func _SetProgressBar_Color($iProgressBarId, $iState)
If @OSBuild < 6000 Then Return SetError(1,0,0); Only works on vista/server08 or higher
_SendMessage(GUICtrlGetHandle($iProgressBarId),0x400 + 16 + $PBS_SMOOTH,$iState,0); $PBM_SETSTATE (WM_USER + 16)
EndFunc

continues without the smooth style :)

Heroes, there is no such thing

One day I'll discover what IE.au3 has of special for so many users using it.
C'mon there's InetRead and WinHTTP, way better
happy.png

Link to post
Share on other sites

Hoi DiOgo,

I've made a small udf for this function it used AutoItObject to do the trick

http://www.nendsoftware.nl/Taskbarprogress.zip

I've made this a while ago for myself.

It has no comment lines in it but it's very easy to know how it works.

I've you have trouble to use it let me know and I will make a example code.

thanks :oops:

it uses the $PBS_SMOOTH?

Heroes, there is no such thing

One day I'll discover what IE.au3 has of special for so many users using it.
C'mon there's InetRead and WinHTTP, way better
happy.png

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...