Results 1 to 6 of 6

Thread: BitBliiting and Save

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Location
    toronto
    Posts
    19
    Puzzle:
    U have a picturebox, then BitBlt' something in it.
    How do u save the picture in file?
    (pleez dont tell me to use savepicture, it doesnt work cuz (i think so) bitblt'ed images are not considered 'picture' or 'image' property of control)
    Thx
    -The Shortest Anecdote: pkunzip.zip

  2. #2
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    You need to enable AutoRedraw of your picture box. And yes, you need to use the .image method:

    Code:
    SavePicture Picture1.Image, "C:\test.bmp"

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Location
    toronto
    Posts
    19
    No way.
    Enabling AutoRedraw wont even let me to bitblitt anything in picturebox...
    Any more ideas?
    -The Shortest Anecdote: pkunzip.zip

  4. #4
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    Sure it does... put a DoEvents after your blitting operation. AutoRedraw lets the picture box hold the picture in memory even if another windows moves over it. SavePicture needs this memory picture to store it It works

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Location
    toronto
    Posts
    19
    Woops... It worked, Thx Fox =)
    -The Shortest Anecdote: pkunzip.zip

  6. #6
    Guest
    Once you draw on it's DC, you can convert the image to the picture using the following statement
    Code:
    Picture1.Picture = Picture1.Image
    'Now you can save it using SavePicture
    SavePicture Picture1.Picture, "C:\MyBitmap.bmp"

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