C#实现图标锁定到Windows任务栏或删除图标
程序员文章站
2022-06-01 10:09:10
...
这个功能在windows上测试安装卸载时,有时会用到
Shell shell = new Shell(); Folder folder = shell.NameSpace(Path.GetDirectoryName(appPath)); FolderItem app = folder.ParseName(Path.GetFileName(appPath)); string sVerb = isLock ? "锁定到任务栏(&K)" : "从任务栏脱离(&K)"; foreach (FolderItemVerb Fib in app.Verbs()) { if (Fib.Name == sVerb) { Fib.DoIt(); return true; } } return false;
上一篇: C#对象初始化器