pointer to handle of a DIB??

B

Bruce D

I apologize...I'm new to VB .NET.
I'm wondering if I can somehow convert the pointer to the handle of a DIB to
the actual DIB? Below is the code that I use to get the pointer to the
handle of a DIB. The code works great!

Dim hdib As IntPtr
hdib = EZTwain.Acquire(Me.Handle())
If hdib.Equals(IntPtr.Zero) Then ....

Here's my problem...I'm trying to use this new property but it must be set
to a DIB...and apparently the hdib will not work. How can I get the DIB
from hdib?

Dim hdib As IntPtr
hdib = EZTwain.Acquire(Me.Handle())
PicssxBarcode1.hDIB = hdib ' this gives me an error because it's
expecting a DIB

I appreciate any help!
-bruce duncan
 
K

Ken Tucker [MVP]

Hi,

There is a gdi+ function GdipCreateBitmapFromGdiDib that you can
call as an api call which I think will help. Maybe this will help.

http://www.visualbasicforum.com/showthread.php?mode=hybrid&t=144075

Ken
------------------
I apologize...I'm new to VB .NET.
I'm wondering if I can somehow convert the pointer to the handle of a DIB to
the actual DIB? Below is the code that I use to get the pointer to the
handle of a DIB. The code works great!

Dim hdib As IntPtr
hdib = EZTwain.Acquire(Me.Handle())
If hdib.Equals(IntPtr.Zero) Then ....

Here's my problem...I'm trying to use this new property but it must be set
to a DIB...and apparently the hdib will not work. How can I get the DIB
from hdib?

Dim hdib As IntPtr
hdib = EZTwain.Acquire(Me.Handle())
PicssxBarcode1.hDIB = hdib ' this gives me an error because it's
expecting a DIB

I appreciate any help!
-bruce duncan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top