Results 1 to 3 of 3

Thread: Help on SAVE Picture after SetPixelV

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2002
    Posts
    31

    Help on SAVE Picture after SetPixelV

    Ok, after using SetPixelV on a Image control, I'd like to save the result of the processing. As a BMP for example.

    Once the picture is modified, if i want to save to disk, it doesn't work using the SavePicture function

    Should i call a API function and give it hDC of the picture box ??

    If you don't understand what i'm talking about :
    http://www.vbforums.com/showthread.php?threadid=207430

  2. #2
    Lively Member
    Join Date
    Jul 2002
    Posts
    69

    Refresh

    I believe ( but am not sure ) that you need to use the refresh method of the picturebox first

    VB Code:
    1. '...so SetPixelV stuff here
    2.  
    3. picturebox.refresh
    4. '...do save stuff here
    "Help!!! I've installed Windows CE,ME and NT and now my computer runs like a brick" - shamelessly stolen sig

  3. #3
    Addicted Member
    Join Date
    Jun 2002
    Location
    Far.. far away! (Netherlands)
    Posts
    169
    You will need to set the autoredraw property of the picturebox to true before drawing, then refresh the picturebox, then use the savepicture function, like this:

    Code:
    picture1.autoredraw = true
    
    'Do Drawing
    '...
    
    picture1.refresh
    savepicture picture1.image, filename
    Offcourse change picture1 in the name of the picturebox you are drawing on.

    -Shell-

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