Results 1 to 3 of 3

Thread: Fail in Saving Picture to BMP file

  1. #1

    Thread Starter
    Lively Member fifo's Avatar
    Join Date
    Dec 2005
    Location
    HaiPhong, Vietnam
    Posts
    77

    Exclamation Fail in Saving Picture to BMP file

    Hi, Experts
    I make a project to save a picture in PictureBox to BMP file with
    VB Code:
    1. Savepicture Picture, Filename
    Command.

    But It does NOT work. I dont know WHY?? Please tell me.



    attachment my Project
    Attached Files Attached Files
    !Have fun!

  2. #2
    PowerPoster jcis's Avatar
    Join Date
    Jan 2003
    Location
    Argentina
    Posts
    4,430

    Re: Fail in Saving Picture to BMP file

    Use this
    VB Code:
    1. SavePicture Picture1.Image, "c:\myPic.bmp" 'Or Filename
    Normally, when the picture is loaded from file/resource you have to use Picture1.Picture (the picture in the control Picture1), but here you are drawing to it, so you have to save the image (Picture1.Image).
    Also, if you don't use the complete path in Filename (like "C:\SomeDir\Myfile.bmp"), then it will always be saved to the same path where your app is.
    Last edited by jcis; May 14th, 2006 at 11:02 PM.

  3. #3

    Thread Starter
    Lively Member fifo's Avatar
    Join Date
    Dec 2005
    Location
    HaiPhong, Vietnam
    Posts
    77

    Re: Fail in Saving Picture to BMP file

    Weldone, so Cool. Thanks so much!!
    !Have fun!

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