|
-
Sep 19th, 2003, 03:23 AM
#1
Thread Starter
Junior Member
Picturebox problem
I tried to save the image from the picturebox to the dataset and it always show the error "A generic error occurred in GDI+" in the second line which saving the pic to memory stream.
my codes are:
Dim tmpStream As New MemoryStream()
Me.PictureBox1.Image.Save(tmpStream, ImageFormat.Jpeg)
Dim BLOBData(tmpStream.Length - 1) As Byte
tmpStream.Position = 0
tmpStream.Read(BLOBData, 0, tmpStream.Length)
dr_teacher("ti_photo") = BLOBData
Anyone knows whats wrong? And how can I "clear" the image in the picturebox dynamically in code?
Regards,
Calvin
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|