I'm writing a VB program that uses scanning support.
When utilizing the sample program as a basis for my application, I encounter the following errors in the subroutine "DisplayNativeImage":
Option Strict On disallows implicit conversions from "Long" to "System.IntPtr"
Option Strict On disallows implicit conversions from "Long" to "Integer"
The code for the subroutine is:
- Code: Select all
Private Sub DisplayNativeImage()
Dim hBitmap As Long = AxTwain1.GetHBitmap
If bDisplayedImage Then picImage.Image.Dispose()
picImage.Image = Image.FromHbitmap(hBitmap)
AxTwain1.DeleteHBitmap(hBitmap)
bDisplayedImage = True
End Sub
The lines in error are:
- Code: Select all
picImage.Image = Image.FromHbitmap(hBitmap)
AxTwain1.DeleteHBitmap(hBitmap)
I am using Visual Basic 2008 Express, w/ .NET framework 3.x. I haven't been to "cast" the type with available casts.
Looking forward to the help!
Thanks!
Peace, Love, and Light,
/s/ Jon C. Munson II
