Leadtools.Wia Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
SetProperties Method
See Also 
Leadtools.Wia Namespace > WiaSession Class : SetProperties Method



item
Handle to the item having its properties set. Retrieve this parameter by either calling the WiaSession.GetRootItem method to get the device’s root item or by enumerating the child items of the device through a call to the EnumChildItems method.
item
Handle to the item having its properties set. Retrieve this parameter by either calling the WiaSession.GetRootItem method to get the device’s root item or by enumerating the child items of the device through a call to the EnumChildItems method.
Sets the values of the properties to the values specified in the WiaProperties structure into the WIA device’s item passed through the item parameter.

Syntax

Visual Basic (Declaration) 
Public Sub SetProperties( _
   ByVal item As Object _
) 
Visual Basic (Usage)Copy Code
Dim instance As WiaSession
Dim item As Object
 
instance.SetProperties(item)
C# 
public void SetProperties( 
   object item
)
C++/CLI 
public:
void SetProperties( 
   Object^ item
) 

Parameters

item
Handle to the item having its properties set. Retrieve this parameter by either calling the WiaSession.GetRootItem method to get the device’s root item or by enumerating the child items of the device through a call to the EnumChildItems method.

Example

For an example, refer to WiaSession.GetRootItem.

Remarks

Call this method after passing a valid WiaProperties structure to the WiaSession.Properties property to set those properties for the WIA device’s item passed through the item parameter.

Add the SetPropertiesEvent event to be informed of any error codes returned from setting each property available in the WiaProperties structure, and to have the ability to cancel the process.

Note:

If the ShowUserInterface flag is set for any of the acquire methods, then be aware that some of the previously set/changed user properties (using any of the SetPropertyXxx or SetProperties methods) will be overwritten by the Microsoft's image acquisition dialog box. Microsoft's image acquisition dialog box sets its own initialization properties like the current intent (image type), selected area (left, top, width and height), paper source and duplex mode, ...etc.

To suppress the manufacturer’s image acquisition dialog and acquire directly from the specified source item through the item parameter using the values set through the SetPropertyXxx and SetProperties methods, do not set the ShowUserInterface flag.

For more information, refer to Managing WIA Sources.

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows 2000, Windows XP, Windows Vista, Windows Server 2003 family, Windows Server 2008 family

See Also