C
C#9mo ago
Dyl_Pickle88

❔ How to set progress bar in taskbar in winform?

Ive tried using TaskbarManager but VS says TaskbarManager does not contain a definition for 'instance', which is how the examples Ive found say to get the active window's taskbar instance.
8 Replies
Dyl_Pickle88
Dyl_Pickle889mo ago
Ive also found https://learn.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-itaskbarlist3-setprogressvalue but it looks like a C++ interface? I'm not well versed in the interactivity of windows APIs...
Buddy
Buddy9mo ago
$code
MODiX
MODiX9mo ago
Posting Code Snippets To post a code snippet type the following: ```cs // code here ``` Notes: - Get an example by typing $codegif in the chat. - Change the language by replacing cs with the language of your choice (for example sql or cpp). - If your code is too long, you can post it to https://paste.mod.gg/ and share the link.
Dyl_Pickle88
Dyl_Pickle889mo ago
TaskbarManager taskbarManager = TaskbarManager.Instance;
taskbarManager.SetProgressState(TaskbarProgressBarState.Normal);
TaskbarManager taskbarManager = TaskbarManager.Instance;
taskbarManager.SetProgressState(TaskbarProgressBarState.Normal);
Intellisense says "TaskbarManager does not contain a definition for 'instance'" on the first line Any ideas?
SinFluxx
SinFluxx9mo ago
TaskbarManager.GetDefault() ?
Dyl_Pickle88
Dyl_Pickle889mo ago
I can use that function but there's no method regarding setting the progressbar. I believe this is the documentation reference for TaskbarManager: https://learn.microsoft.com/en-us/uwp/api/windows.ui.shell.taskbarmanager?view=winrt-22621
SinFluxx
SinFluxx9mo ago
Have you got the windowsapicodepack nuget package?
Accord
Accord9mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.