Item.GetItemsFromUI method
The GetItemsFromUI method of the Item object displays a dialog box that allows a user to select images and audio to transfer from a device.
Syntax
retVal = Item.GetItemsFromUI(
Flags = 0,
Intent = 0
)
Parameters
-
Flags [in]
-
Type: WiaFlag
-
(0)
-
Default. [in] Specifies dialog box behavior. The valid values for this parameter are the same as for the lFlags parameter of the DeviceDlg method.
Intent [in]
Type: WiaIntent
(0)
Default. [in] Specifies what type of data the image is intended to represent. For a list of image intent values, see Image Intent Constants.
Return value
Type: ICollection
This method returns a collection of Item objects that represent the items selected by the user. If no items are selected, the collection is empty.
Remarks
For Microsoft Visual Basic applications, add a reference to "Windows Image Acquisition 1.01 Type Library".
This method applies only to devices (root items). The method returns a collection of Item objects that represent the images or audio clips selected by the user.
If no items are selected by the user, the method returns an empty collection.
Examples
The following example demonstrates the use of the GetItemsFromUI method to allow a user to select images from a dialog box.
<SCRIPT LANGUAGE="VBScript">
Dim objWia
Dim objDeviceInfoCollection
Dim objDeviceInfo
Dim objRootItem
Dim objSelectedItems
Set objWIA = CreateObject("Wia.Script")
Set objDeviceInfoCollection = objWia.Devices
For Each objDeviceInfo In objDeviceInfoCollection
Set objRootItem = objWia.Create(objDeviceInfo)
Set objSelectedItems = objRootItem.GetItemsFromUI(0, 0)
' Do something with selected items.
Next
</SCRIPT>
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows 2000 Professional, Windows XP [desktop apps only] |
Minimum supported server |
Windows Server 2003 [desktop apps only] |
DLL |
|