OutOfMemory Exception Error
I'm working on a rather complicated program using signature tablets. Someone signs the tablet, displaying their signature on screen. That signature is then broken down into a unicode byte string to be saved into a database. So far, so good. When I open a second form, designed to display entries from the database, it gets as far as the code below and give me an error message saying 'OutOfMemory Exception is unhandled'.
This is the code designed to retrieve the unicode string from the database and turn it back into a signature.
Dim ImgDataAsStringImgData = RegisterdbDataSet.Time_In_Table.NewTime_In_TableRow.Signature_Data()
Dim bytesAsByte() = System.Text.Encoding.Unicode.GetBytes(ImgData)FileOpen(1, Environ(
"temp") &"\Sample.jpg", OpenMode.Binary)FilePut(1, bytes, ,
True,True)FileClose(1)
SignatureDisplay.Image = System.Drawing.Image.FromFile(Environ(
"temp") &"\Sample.jpg")'delete the temporary image fileKill(Environ(
"temp") &"\Sample.jpg")The highlighted line is the line that is giving me the error.
I found this thread (http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=667327&SiteID=1 ) which seems to cover the same topic, but it looks like this won't apply here since the image is only 180x110 pixels, therefore less the 1MB in size.
If anyone can help, it would be appreciated.

