R
rocio
I have this segment of code to display an image in a PictureBox:
Private ms as MemoryStream
Public Function DisplayImage(byval bufBmp as Byte()) as Boolean
try
ms = new MemoyStream(bufBmp)
PictureBox1.Image = New Bitmap(ms)
PictureBox1.Update()
: :
catch ex as Exception
MsgBox(ex.toString)
end try
it crashes on the PictureBox1.Image = New Bitmap(ms) statement with the error:
System.ArgumentException: ArgumentException
any ideas why?
I checked that ms is defined, by inserting a line after defining ms to display its length in bytes.
Private ms as MemoryStream
Public Function DisplayImage(byval bufBmp as Byte()) as Boolean
try
ms = new MemoyStream(bufBmp)
PictureBox1.Image = New Bitmap(ms)
PictureBox1.Update()
: :
catch ex as Exception
MsgBox(ex.toString)
end try
it crashes on the PictureBox1.Image = New Bitmap(ms) statement with the error:
System.ArgumentException: ArgumentException
any ideas why?
I checked that ms is defined, by inserting a line after defining ms to display its length in bytes.