Home > front end >  progress bar on taskbar icon using winforms .net 6 vb.net
progress bar on taskbar icon using winforms .net 6 vb.net

Time:04-21

I am having a hard time finding a solution to display the status of a progressbar on the taskbar icon on Windows 10/11. Do you have suggestions. I use Winforms with VB.Net .Net 6.

enter image description here

CodePudding user response:

thanks to all the same, I solved it like this:

installed package NuGet: "Microsoft-WindowsAPICodePack-Core" by rpastric, contre, dahall

'Imports
Imports Microsoft.WindowsAPICodePack.Taskbar

        Dim stato_istanza = TaskbarProgressBarState.Normal
        Dim istanza = TaskbarManager.Instance
        istanza.SetProgressState(stato_istanza)
        istanza.SetProgressValue(value, valuemax)

All tested and working with Winforms VB.Net with .Net 6.0 and Visual Studio 2022

CodePudding user response:

I'm not 100% sure as it's not something that I've done myself but I think that you can use the Microsoft.Windows.SDK.Contracts package for that. I believe that that is what replaced the WindowsAPICodePack package.

  • Related