❔ 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
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...
$code
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.
Intellisense says "TaskbarManager does not contain a definition for 'instance'" on the first line
Any ideas?
TaskbarManager.GetDefault() ?
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
Have you got the windowsapicodepack nuget package?
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.