vb.net - 使用 winforms .net 6 vb.net 任务栏图标上的进度条

标签 vb.net winforms winforms-interop

我很难找到在 Windows 10/11 上的任务栏图标上显示进度条状态的解决方案。你有什么建议吗? 我将 Winforms 与 VB.Net .Net 6 结合使用。

enter image description here

最佳答案

感谢大家,我是这样解决的:

已安装软件包 NuGet:“Microsoft-WindowsAPICodePack-Core”,作者: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)

所有内容均经过测试并可与 Winforms VB.Net 以及 .Net 6.0 和 Visual Studio 2022 配合使用

关于vb.net - 使用 winforms .net 6 vb.net 任务栏图标上的进度条,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71938659/

相关文章:

.net - 如何创建 ListView 的 SelectedItem 属性的双向链接?

VB.NET form.show() 错误

vb.net - 读取 csv 文件没有显示任何内容?

C#:在哪些类中使用了 ICommandExecutor 接口(interface)?

.net - XmlReader - 将当前节点读取为字符串

c# - Windows 窗体 ComboBox 导致间歇性 System.AccessViolationException

c# - 在 Visual Studio 2012 中设置 ClickOnce 安装文件夹 URL

.net - WinForms 到 WPF - 我们如何从这里到达那里?

c# - 带有 DWM : how to handle WM_NCCALCSIZE correctly 的自定义窗框

wpf - 是否可以将 QT 应用程序托管到 WPF 应用程序中?