DeviceID Property

Retrieves the DeviceID for this Device.

Syntax

[ pbstrResult = ] Device.DeviceID

Possible Values

pbstrResult String value.

The property is read-only. The property has no default value.

Remarks

The following example shows how to display the name and ID of the selected device.


Dim dev 'As Device

Set dev = CommonDialog1.ShowSelectDevice

MsgBox "You selected the following device" & vbCrLf & _
       "Name:" & dev.Properties("Name").Value  & vbCrLf & _
       "DeviceID:" & dev.DeviceID

Property Information

Minimum operating systems Windows XP SP1

See Also

Device, DeviceID (DeviceInfo), OnEvent, RegisterEvent, RegisterPersistentEvent, UnregisterEvent, UnregisterPersistentEvent