Discussion Locked

Display picture in VB

0 helpful
9 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I have a image in the memory but VB's picturebox accept only file input. How can I display it with writing it to the disk first? (I read the image from Oracle)

9 replies

by don christner

Do you mean that it is in the Windows Clipboard? If so you can get it to a picture box with the following (I think the syntax is correct).

picbox.picture=clipboard.getdata

Don

by tuanna123

No, I want picture box to get directly from memory. If it get data from clipboard, how can I put the image stream to clipboard?

by vipulgtyagi

Hi, if i percieve right the img must be stored in DB as BLOB or CLOB object.To read the stored image file from VB use the ADO recordsets(RS)methods. " RS.getchunk and Rs.Appendchunk".

To display the picture in picbox ,first read the file from Oracle,get in recordset ,and save the file @temp location(using FSO).The picbox file_src can be set to this temp filee.

by sl-campbell

What do you mean "from memory"?
If you are using a recordset object do get the data from the database then just set the datasource of the picture box to the recordset object or data control and the datafield to the rs field name.
You can also do this with an OLE container object, if the image is one that the picture box cannot display (like a TIFF file).

If it is only stored in memory then you will need to use an API function to retrieve the long binary data from memory.

This discussion is closed to new replies.