EZTW32.DLL scanner TWAIN with vb.net-VBForums
Results 1 to 2 of 2

Thread: EZTW32.DLL scanner TWAIN with vb.net

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2003
    Posts
    68

    EZTW32.DLL scanner TWAIN with vb.net

    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

    VB Code:
    1. Option Strict Off
    2. Option Explicit On
    3. Module Module1
    4.     ' 32-bit EZTWAIN functions for Visual Basic 5.0
    5.     Declare Function TWAIN_AcquireToClipboard Lib "EZTW32.DLL" (ByVal hwndApp As Integer, ByVal wPixTypes As Integer) As Integer
    6.     Declare Function TWAIN_SelectImageSource Lib "EZTW32.DLL" (ByVal hwndApp As Integer) As Integer
    7. End Module
    8.  
    9.  
    10.  
    11.  
    12.     Private Sub Command1_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command1.Click
    13.         Dim r As Object
    14.  
    15.         r = TWAIN_SelectImageSource(Me.Handle.ToInt32)
    16.     End Sub
    17.    
    18.     Private Sub Command2_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command2.Click
    19.         Dim r As Object
    20.         Dim t As Short
    21.  
    22.         r = TWAIN_AcquireToClipboard(Me.Handle.ToInt32, t)
    23.  
    24.         Dim iData As IDataObject = Clipboard.GetDataObject
    25.         Picture1.Image = iData.GetData
    26.        
    27.     End Sub
    Last edited by oxbow123; Jun 19th, 2003 at 03:56 PM.

  2. #2

    Thread Starter
    Lively Member
    Join Date
    May 2003
    Posts
    68
    Nobody ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.