CommandID Constants
Applies to: desktop apps only
Specifies common Device and Item commands as String versions of GUIDs.
Remarks
Use a CommandID Constants constant as the value for the CommandID parameter for the ExecuteCommand (Device) and ExecuteCommand (Item) methods. You can also use a CommandID Constants constant as the value of the CommandID properties in a DeviceCommand object.
The following example shows how to signal a camera to take a picture if the device selected is a camera.
Dim dev 'As Device
Set dev = CommonDialog1.ShowSelectDevice
If dev.Type = CameraDeviceType Then
Dim itm 'As Item
Set itm = dev.ExecuteCommand(wiaCommandTakePicture)
End If
Similar to the previous code example, the following example shows how to determine if the selected device supports the wiaCommandTakePicture command.
Dim dev 'As Device
Dim dc 'As DeviceCommand
Set dev = CommonDialog1.ShowSelectDevice
For Each dc In dev.Commands
If dc.CommandID = wiaCommandTakePicture Then
MsgBox "Selected device supports the TakePicture command"
End If
End If
Requirements
|
Minimum supported client | Windows XP with SP1 |
|---|---|
|
Minimum supported server | Windows Server 2003 |
|
Header |
|
|
IDL |
|
See also
Send comments about this topic to Microsoft
Build date: 2/3/2012