How to detect image Scanner in vb.net Programatically
Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
2 posts
Page 1 of 1
How to Use Image Scanner In vb.net 2008 Pls Provide Screen Shots I Really need It
Tnx In advanced
Tnx In advanced
You can use the Windows Image Acquisition Automation Library to acquire an image from an imaging device.
The useful paramaters will be in the ShowAcquireImage function.
The useful paramaters will be in the ShowAcquireImage function.
Code: Select all
Imports WIA
Code: Select all
Private Sub btnScan_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnScan.Click
Dim dm As DeviceManager = New DeviceManager()
If dm.DeviceInfos.Count = 0 Then
MsgBox("No imaging devices found")
Return
End If
Dim cd As WIA.CommonDialog = New WIA.CommonDialog()
Dim imgf As ImageFile = cd.ShowAcquireImage(FormatID:=FormatID.wiaFormatJPEG)
Dim ms As MemoryStream = New MemoryStream(CType(imgf.FileData.BinaryData, Byte()))
Dim i As Image = Image.FromStream(ms)
ms.Close()
PictureBox1.Image = i
End Sub
2 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023