共用方式為


Properties Window Object List

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

The object list in the Properties window is a drop-down list that allows you to change the selection to other objects available within one or more selected windows. Selecting a different object from within this list triggers a call to SelectObjects to inform the environment that a new object has been selected. The information displayed in the Properties window is then changed to show the properties associated with the newly selected object.

The Object List

The object list consists of two fields: the object name (displayed in bold) and the object type.

The object name displayed to the left of the object type in bold is retrieved from the object itself using the Name property provided by the IProvideClassInfo interface. GetClassInfo, the only method on IProvideClassInfo, returns ITypeInfo for that interface's coclass. The Properties window uses IProvideClassInfo to get the name of the coclass, which is displayed as the object name in the drop-down list.

If the object does not have a Name property, a name is not displayed in the Name area of the object list. You can add a Name property to the object if you want the name displayed in the object list.

If the COM object does not implement IProvideClassInfo, the Properties window displays the interface name in place of the object name on the left side of the list.

See also