Results 1 to 5 of 5

Thread: Modifying and saving bitmaps

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2002
    Posts
    2

    Modifying and saving bitmaps

    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

  2. #2
    Addicted Member ChuckB's Avatar
    Join Date
    Jul 2002
    Location
    South Carolina, USA
    Posts
    157
    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.

    Code:
    Picture1.Line (100, 100)-(1000, 1000)           'draw something
    SavePicture Picture1.Image, "mybmp.bmp"   'save picture
    Regards,
    ChuckB
    I learn Robotics, Electronics and Game Programming at http://www.gameinstitute.com

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2002
    Posts
    2
    Thanks Chuck that's a big help. Thought I was going to have to delve into APIs etc.

    Cheers

    Cookie

  4. #4
    Frenzied Member Zaei's Avatar
    Join Date
    Jul 2002
    Location
    My own little world...
    Posts
    1,710
    Chuck, ROFL at your avatar! Nice one! =).

    Z.

  5. #5
    Addicted Member ChuckB's Avatar
    Join Date
    Jul 2002
    Location
    South Carolina, USA
    Posts
    157
    Thanks Z...by far one of my biggest accomplishments in Paintbrush to date. :-)

    Regards,
    ChuckB
    I learn Robotics, Electronics and Game Programming at http://www.gameinstitute.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width