Click to See Complete Forum and Search --> : Modifying and saving bitmaps
Cookie
Oct 4th, 2002, 05:30 AM
Hi wonder if anyone could help me? I basically want to make things I have drawn on a picture in a picture box (using pset , line, circle etc.) persistent (ie still be there after the picture is refreshed) and also be able to save the graphic I have ended up with as a bitmap. Can this be done using VB Picture boxes or do I need to delve into VC++
Thanks for any advice
Cheers
Cookie
ChuckB
Oct 4th, 2002, 07:13 AM
Hi Cookie,
The code below draws a simple line in picture box 'picture1'. The SavePicture routine needs a 'handle' to the picture. That is what 'image' means. If you look closely at VB, you see that forms have 'image' also. The size of the BMP depends upon the size of your picture box.
Picture1.Line (100, 100)-(1000, 1000) 'draw something
SavePicture Picture1.Image, "mybmp.bmp" 'save picture
Regards,
ChuckB
Cookie
Oct 4th, 2002, 08:11 AM
Thanks Chuck that's a big help. Thought I was going to have to delve into APIs etc.
Cheers
Cookie
Zaei
Oct 4th, 2002, 11:53 AM
Chuck, ROFL at your avatar! Nice one! =).
Z.
ChuckB
Oct 4th, 2002, 01:45 PM
Thanks Z...by far one of my biggest accomplishments in Paintbrush to date. :-)
Regards,
ChuckB
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.