Jump to content



Photo

Taskbar progressbar (windows 7)


  • Please log in to reply
9 replies to this topic

#1 DiOgO

DiOgO

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 331 posts

Posted 25 February 2012 - 02:30 AM

Hi everyone :)

Someone knows who do I display the progress bar in the taskbar?

example:

Posted Image


I don't know how to use this code (I me newbie here): http://msdn.microsoft.com/en-us/magazine/dd942846.aspx

Heroes, there is no such thing








#2 AdmiralAlkex

AdmiralAlkex

    I'm on a boat

  • MVPs
  • 4,490 posts

Posted 25 February 2012 - 03:30 AM

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

#3 DiOgO

DiOgO

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 331 posts

Posted 25 February 2012 - 02:21 PM

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

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

Heroes, there is no such thing


#4 DiOgO

DiOgO

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 331 posts

Posted 25 February 2012 - 05:17 PM

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


#5 Aipion

Aipion

    Prodigy

  • Active Members
  • PipPipPip
  • 191 posts

Posted 25 February 2012 - 06:00 PM

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

In Development - Setup Fusion

Library - Page Menu Control

Antonio Do Rosario

#6 DiOgO

DiOgO

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 331 posts

Posted 25 February 2012 - 07:59 PM

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, 25 February 2012 - 08:17 PM.

Heroes, there is no such thing


#7 Aipion

Aipion

    Prodigy

  • Active Members
  • PipPipPip
  • 191 posts

Posted 26 February 2012 - 12:04 AM

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

In Development - Setup Fusion

Library - Page Menu Control

Antonio Do Rosario

#8 DiOgO

DiOgO

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 331 posts

Posted 26 February 2012 - 12:39 AM

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


#9 nend

nend

    Adventurer

  • Active Members
  • PipPip
  • 138 posts

Posted 28 February 2012 - 01:48 PM

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.

#10 DiOgO

DiOgO

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 331 posts

Posted 03 March 2012 - 02:11 AM

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





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users