Windows 7 API - Jumplist

  • VB.NET

Es gibt 4 Antworten in diesem Thema. Der letzte Beitrag () ist von Mangafreak1995.

    Windows 7 API - Jumplist

    Da flo.exe in seinem ansonsten sehr guten Tutorial die Jumplists nicht berücksichtigt hat, hier meine Frage:

    Wie kann ich ein Icon vor bereits erstelle Jumplist-Einträge setzen?
    Ich habe mit

    VB.NET-Quellcode

    1. If TaskbarManager.IsPlatformSupported Then
    2. Dim jumpList = Microsoft.WindowsAPICodePack.Taskbar.JumpList.CreateJumpList()
    3. Dim systemFolder = Environment.GetFolderPath(Environment.SpecialFolder.System)
    4. jumpList.AddUserTasks(New JumpListLink(Path.Combine(systemFolder, "taskmgr.exe"), "Taskmanager öffnen"))
    5. jumpList.AddUserTasks(New JumpListLink(Path.Combine(systemFolder, "perfmon.exe"), "Resourcenmonitor öffnen"))
    6. jumpList.Refresh()
    7. Else
    8. MessageBox.Show("Diese Anwendung funktioniert leider nur auf Windows 7.", "Ups...", MessageBoxButtons.OK, MessageBoxIcon.Error)
    9. Me.Close()
    10. End If

    zwei Einträge gemacht, die den Taskmanager oder den Resourcenmonitor öffnen, aber da fehlt noch ein Icon.
    Wie binde ich das ein?

    Und bitte keine Fragen wie "Was ist die Jumplist?", Google ist euer Freund ;)
    Hallo,

    schau mal hier: code.msdn.microsoft.com/WindowsAPICodePack

    da gibts diesen Link: code.msdn.microsoft.com/Projec…ICodePack&DownloadId=6859

    der führt dich zur Doku des WindowsAPICodePack.

    Habe mich damit leider noch nicht befasst, aber das hier:


    JumpListLink Members
    IconReference - Gets or sets the icon reference (location and index) of the link's icon.

    IconReference Members
    ModuleName - String specifying the name of an executable file, DLL, or icon file
    ReferencePath - Reference to a specific icon within a EXE, DLL or icon file.
    ResourceId - Zero-based index of the icon


    ergo sowas wie

    halb-pseudo-code

    VB.NET-Quellcode

    1. Dim jumpList = Microsoft.WindowsAPICodePack.Taskbar.JumpList.CreateJumpList()
    2. Dim systemFolder = Environment.GetFolderPath(Environment.SpecialFolder.System)
    3. Dim jmpLink1 as New JumpListLink(Path.Combine(systemFolder, "taskmgr.exe")
    4. Dim jmpLink2 as New JumpListLink(Path.Combine(systemFolder, "perfmon.exe")
    5. Dim icoRef1 as new iconRefernce() With {.ModuleName="xyz", .ReferencePath="../my.dll", .ResourceId = 5}
    6. Dim icoRef2 as new iconRefernce() With {.ModuleName="xyz", .ReferencePath="../my.dll", .ResourceId = 2}
    7. jmpLink1.IconReference = icoRef1
    8. jmpList2.IconReference = icoRef2
    9. jumpList.AddUserTasks(jmpLink1, "Taskmanager öffnen"))
    10. jumpList.AddUserTasks(jmpLink2, "Resourcenmonitor öffnen"))
    11. jumpList.Refresh()


    könnte dir helfen.
    Der Thread ist zwar schon etwas alt, aber ich wollte jetzt nicht unbedingt einen neuen Starten.

    Wie kann ich die JumpList Links wieder Löschen?
    Und ist es auch möglich, das man dann statt eine datei zu öffen, das man dan eine Form öffnen kann?