
'Declaration <ToolboxBitmapAttribute(Vintasoft.Twain.DeviceManager, "DeviceManager.icon.bmp")> <DesignerCategoryAttribute("Component")> Public NotInheritable Class DeviceManager Inherits System.ComponentModel.Component
'Usage Dim instance As DeviceManager
[ToolboxBitmap(Vintasoft.Twain.DeviceManager, "DeviceManager.icon.bmp")] [DesignerCategory("Component")] public sealed class DeviceManager : System.ComponentModel.Component
[ToolboxBitmap(Vintasoft.Twain.DeviceManager, "DeviceManager.icon.bmp")] [DesignerCategory("Component")] public __gc __sealed class DeviceManager : public System.ComponentModel.Component
[ToolboxBitmap(Vintasoft.Twain.DeviceManager, "DeviceManager.icon.bmp")] [DesignerCategory("Component")] public ref class DeviceManager sealed : public System.ComponentModel.Component
''' <summary> ''' Starts the asynchronous image acquisition from scanner. ''' </summary> Private Sub StartScan(ByVal deviceManager As Vintasoft.Twain.DeviceManager) ' specify TWAIN name of this application deviceManager.ApplicationProductName = "MyTwainApplication" Try ' open the device manager deviceManager.Open() ' show the default device selection dialog If Not deviceManager.ShowDefaultDeviceSelectionDialog() Then ' exit if default device is not selected Return End If ' get reference to the default device Dim device As Vintasoft.Twain.Device = deviceManager.DefaultDevice ' acquire image(s) from the device device.Acquire() Catch ex As Vintasoft.Twain.TwainException Console.WriteLine(ex.Message) End Try End Sub
/// <summary> /// Starts the asynchronous image acquisition from scanner. /// </summary> void StartScan(Vintasoft.Twain.DeviceManager deviceManager) { // specify TWAIN name of this application deviceManager.ApplicationProductName = "MyTwainApplication"; try { // open the device manager deviceManager.Open(); // show the default device selection dialog if (!deviceManager.ShowDefaultDeviceSelectionDialog()) // exit if default device is not selected return; // get reference to the default device Vintasoft.Twain.Device device = deviceManager.DefaultDevice; // acquire image(s) from the device device.Acquire(); } catch (Vintasoft.Twain.TwainException ex) { System.Console.WriteLine(ex.Message); } }
System.Object
System.MarshalByRefObject
System.ComponentModel.Component
Vintasoft.Twain.DeviceManager
Target Platforms: .NET 6; .NET 5; .NET Core 3.1; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5