[英]Jumplists in VB.NET Windows Form Application
有沒有辦法在 VB.NET Windows 表單應用程序中創建 Windows 任務欄跳轉列表? 我想將我上次打開的文件添加到列表中。
I've done a bunch of searching and can find this: https://docs.microsoft.com/en-us/dotnet/api/system.windows.shell.jumplist?redirectedfrom=MSDN&view=net-5.0 , but I can不知道如何在我的應用程序中訪問 System.Windows.Shell。 它說找不到命名空間。
您可以指出我的任何方向將不勝感激!
這是我的工作:
Dim a As System.Windows.Application = System.Windows.Application.Current
If a Is Nothing Then a = New System.Windows.Application
Dim currJumpList As System.Windows.Shell.JumpList = JumpList.GetJumpList(a)
If currJumpList Is Nothing Then
currJumpList = New JumpList
JumpList.SetJumpList(a, currJumpList)
Else
currJumpList.JumpItems.Clear()
End If
Dim jumpTask As JumpTask
jumpTask = New JumpTask
jumpTask.Title = "This is what gets shown to the user"
jumpTask.Description = "This is what the user sees if they hover or the item"
jumpTask.ApplicationPath = "pathToYourEXE"
jumpTask.Arguments = "Your arguments"
jumpTask.CustomCategory = "The category header"
currJumpList.JumpItems.Add(jumpTask)
currJumpList.Apply()
重要筆記:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.