Share via


System.AppUserModel.ID

明確應用程式使用者模型識別碼 (AppUserModelID) ,用來將進程、檔案和視窗與特定應用程式產生關聯。 在某些情況下,就足以依賴系統指派給進程的內部 AppUserModelID。 不過,擁有多個進程的應用程式或主進程中執行的應用程式可能需要透過這個屬性明確識別本身,以便將其其他不同的視窗分組在單一工作列按鈕下,並控制該應用程式跳躍清單的內容。

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

如需詳細資訊,請參閱 應用程式使用者模型識別碼 (AppUserModelIDs)

在設定 System.AppUserModel.ID 屬性時,工作列會收到通知,以在 AppUserModelID 的視窗或快捷方式上重新整理其資訊。

其他視窗和快捷方式屬性可以與明確的 AppUserModelID 搭配使用,以進一步控制與視窗相關聯的群組和釘選、工作列中用於它的顯示名稱和圖示,以及透過該應用程式跳躍清單啟動釘選至工作列的應用程式或應用程式的新實例的命令。 設定 System.AppUserModel.ID 屬性之前,應該先設定這些屬性。 如需詳細資訊,請參閱下列主題:

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

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

備註

PKEY 值定義于 Propkey.h 中。

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

SHGetPropertyStoreForWindow

propertyDescriptionList

propertyDescription

searchInfo

labelInfo

typeInfo

displayInfo

aliasInfo

stringFormat

booleanFormat

numberFormat

dateTimeFormat

enumeratedList

enum

enumRange

image

drawControl

editControl

filterControl

queryControl

relatedPropertyInfo

relatedProperty