I have found an example of code for VB5 using tawin.
I have try to translate it in vb.net but some object changed.
Does anyone has an idea about the correct code ?
Thanks
I have try to translate it in vb.net but some object changed.
Does anyone has an idea about the correct code ?
Thanks
PHP:
Option Strict Off
Option Explicit On
Module Module1
' 32-bit EZTWAIN functions for Visual Basic 5.0
Declare Function TWAIN_AcquireToClipboard Lib "EZTW32.DLL" (ByVal hwndApp As Integer, ByVal wPixTypes As Integer) As Integer
Declare Function TWAIN_SelectImageSource Lib "EZTW32.DLL" (ByVal hwndApp As Integer) As Integer
End Module
Private Sub Command1_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command1.Click
Dim r As Object
r = TWAIN_SelectImageSource(Me.Handle.ToInt32)
End Sub
Private Sub Command2_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command2.Click
Dim r As Object
Dim t As Short
r = TWAIN_AcquireToClipboard(Me.Handle.ToInt32, t)
Dim iData As IDataObject = Clipboard.GetDataObject
Picture1.Image = iData.GetData
End Sub