Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display a bitmap that only exists in memory

Status
Not open for further replies.

Julio

Programmer
Dec 2, 1998
13
0
0
BE
Visit site
Hi,<br><br>I have a byte array b() which contains a bitmap image. I can save it to disk as a file with a .bmp extension, and paint will open it no problem. I can also put it in a database and retrieve just fine. <br><br>But, what I'd like to do is disply it in a picture or image control *without* doing any of that. Just display it with somthing like 'set picture1.picture = b()', which of course doesn't work. Does anybody know of a way to do this?<br><br>Thanks all,<br><br><br>Julio<br>
 
Julio,<br><br>From the VB6 help<br><br>&quot;At design time, you can transfer a graphic with the Clipboard using the Copy, Cut, and Paste commands on the Edit menu. At run time, you can use Clipboard methods such as GetData, SetData, and GetFormat with the nontext Clipboardconstants vbCFBitmap, vbCFMetafile, and vbCFDIB, which are listed in the Visual Basic (VB)object library in theObject Browser.&quot;<br><br> <p>Mike<br><a href=mailto:michael.j.lacey@ntlworld.com>michael.j.lacey@ntlworld.com</a><br><a href= Cargill's Corporate Web Site</a><br>
 
Mike,<br><br>Thanks, I saw that already, but the thing is, my bitmap data is in a byte array (so, in memory) but not in the clipboard. <br><br>But wait, maybe I can put my byte array in the clipboard, and from there in the picture control. I'm gonna try that, I'll keep you posted. <br><br>Thanks,<br><br>Julio<br><br><br><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top