Recent

Author Topic: Win32TaskbarProgress component  (Read 1427 times)

AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • UVviewsoft
Win32TaskbarProgress component
« on: December 24, 2020, 02:06:20 pm »
Today I searched in google for Win7 taskbar progress code. Found an example for D7. At stackoverflow. Then I adapted it for Lazarus. And wrote a demo. All worked. Then i found another example in the Lazarus forum! It was 12 times simpler than previous ex! I found what was simpler:
- CLSID_ const, and Win interfaces are taken from FPC ShlObj
- ComCreate method was called from ComObj unit, simpler
Now my code is 2x smaller.
Also I stripped stuff to do KISS. Stuff is parasite properties: Marquee, and Visible (they were stupid wrappers around Style).

The result is a component with KISS:
https://wiki.lazarus.freepascal.org/Win32TaskbarProgress

You can set Value: 0 to 100.
You can set Style: None, Animation, Normal, Error, Pause.
« Last Edit: December 25, 2020, 05:42:48 am by Alextp »

cappe

  • Full Member
  • ***
  • Posts: 191
Re: Win32TaskbarProgress component
« Reply #1 on: December 24, 2020, 06:51:08 pm »
nice

sstvmaster

  • Sr. Member
  • ****
  • Posts: 299
« Last Edit: January 04, 2021, 06:44:19 pm by sstvmaster »
greetings Maik

Windows 10,
- Lazarus 2.2.6 (stable) + fpc 3.2.2 (stable)
- Lazarus 2.2.7 (fixes) + fpc 3.3.1 (main/trunk)

 

TinyPortal © 2005-2018