D
David
I have a bimap picuture saved in an access file. the table column type is
OLE object. In VB.Net I am trying to load this image and show it on the
form. I use following code.
Dim pitbyte() As Byte
pitbyte = drCurrent("pic")
Debug.WriteLine(drCurrent("pic"))
Dim ms As MemoryStream = New MemoryStream(pitbyte)
Dim streamedBitmap As Bitmap
streamedBitmap = Bitmap.FromStream(ms) '******** this line cause problem
Me.methodpic.Image = streamedBitmap
then"An unhandled exception of type 'System.ArgumentException' occurred in
system.drawing.dll
Additional information: Invalid parameter used."
Could anybody tell me why I get Invalid parameter used exception?
OLE object. In VB.Net I am trying to load this image and show it on the
form. I use following code.
Dim pitbyte() As Byte
pitbyte = drCurrent("pic")
Debug.WriteLine(drCurrent("pic"))
Dim ms As MemoryStream = New MemoryStream(pitbyte)
Dim streamedBitmap As Bitmap
streamedBitmap = Bitmap.FromStream(ms) '******** this line cause problem
Me.methodpic.Image = streamedBitmap
then"An unhandled exception of type 'System.ArgumentException' occurred in
system.drawing.dll
Additional information: Invalid parameter used."
Could anybody tell me why I get Invalid parameter used exception?