共用方式為


System.AppUserModel.RelaunchIconResource

指定當使用者選擇將應用程式釘選到任務列或透過其按鈕的 [跳躍清單] 啟動新實例時,用於任務列上建立之快捷方式的圖示。 這是用於任務列群組的圖示,並針對釘選的應用程式顯示該應用程式是否正在執行。 這應該以下欄其中一種格式指定:

  • 標準資源格式,例如 「%systemdir%\system32\shell32.dll,-128」。。 需要資源識別碼之前的 『-』 字元。 請勿在路徑字串前面使用 『@』 字元。
  • 圖示檔的直接路徑,例如 「%programfiles%\Microsoft\記事本\Notepad.ico,0“。 請注意,由於.ico檔案可以包含多個圖示資源,因此字串中需要資源標識符。 如果.ico檔案是單一映射,請使用 「0」 (不含 '-' 字元)作為資源標識符。

System.AppUserModel.RelaunchIconResource 是選擇性屬性。 如果未設定,則會使用 relaunch 命令的目標圖示 (System.AppUserModel.RelaunchCommand]。 不過,由於這可能會導致不想要的結果,因此強烈建議您透過此屬性明確提供圖示。

只有當視窗具有明確的應用程式使用者模型標識碼 (AppUserModelID) 時,才會使用這個屬性(System.AppUserModel.ID透過 SHGetPropertyStoreForWindow設定)。 如果窗口沒有明確的 AppUserModelID (System.AppUserModel.ID),則會忽略此屬性,而且視窗會分組並釘選,就像是其擁有程式的一部分一樣。 如需應用程式明確 AppUserModelID 及其在工作列釘選上作用的詳細資訊,請參閱 應用程式使用者模型識別碼 (AppUserModelIDs)。 此屬性是供想要提供非預設重新啟動資訊的應用程式或視窗使用。 如需詳細資訊,請參閱 System.AppUserModel.RelaunchCommand

如果在視窗上設定明確的 AppUserModelID,但未設定此屬性,系統會嘗試尋找具有相同 AppUserModelID 的快捷方式,並將該快捷方式釘選到任務欄來代表視窗。 如果找不到這類快捷方式,則會使用擁有該快捷方式的進程備份可執行檔。

注意

如果 已設定 System.AppUserModel.PreventPinning,則會忽略此屬性。 這可讓應用程式藉由指派明確的AppUserModelID來控制其視窗的群組,但防止這些視窗釘選。

 

若要在視窗上設定此屬性,請使用 SHGetPropertyStoreForWindow 來擷取視窗的屬性存放區,並使用擷取 IPropertyStore 物件的 方法來設定該視窗的 System.AppUserModel.RelaunchIconResource 属性。

Windows 10 版本 1703、Windows 10 版本 1607、Windows 10 版本 1511、Windows 10 版本 1507、Windows 8.1

propertyDescription
   name = System.AppUserModel.RelaunchIconResource
   shellPKey = PKEY_AppUserModel_RelaunchIconResource
   formatID = 9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3
   propID = 3
   SearchInfo
      InInvertedIndex = false
      IsColumn = true
   typeInfo
      type = String
      IsInnate = false

Windows 8、Windows 7

propertyDescription
   name = System.AppUserModel.RelaunchIconResource
   shellPKey = PKEY_AppUserModel_RelaunchIconResource
   formatID = 9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3
   propID = 3
   SearchInfo
      InInvertedIndex = false
      IsColumn = false
   typeInfo
      type = String
      IsInnate = false

應用程式使用者模型識別碼 (AppUserModelIDs)

System.AppUserModel.ID

propertyDescriptionList

propertyDescription

searchInfo

labelInfo

typeInfo

displayInfo

aliasInfo

stringFormat

布爾值Format

numberFormat

dateTimeFormat

enumeratedList

列舉

enumRange

映像

drawControl

editControl

filterControl

queryControl

relatedPropertyInfo

relatedProperty