Results 1 to 10 of 10

Thread: Savina A Bitmap

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2000
    Posts
    33
    I need to save the contents of a picture box to a bitmap file. Could someome please write me a little (or big) snippet of code for that purpose? Thanks!

  2. #2
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    there is a method called savepicture.
    I dont really know the syntax now, but I think it is pretty much like

    savepicture picture.image, filename

    just look, the function is easy
    Sanity is a full time job

    Puh das war harter Stoff!

  3. #3
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238
    MisanThr0p, the Image is the default pictureBox properties, hence no need to mention in the code. Like this will do

    Code:
    SavePicture Picture1, "C:\Mypics.bmp"

  4. #4
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    I heard default properties will no longer exist in newer VB version, so don't even begin programming like that.
    Sanity is a full time job

    Puh das war harter Stoff!

  5. #5
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    It's indeed better to write the whole property.

    Else you'll often trap into mistakes which are hard to debug..

  6. #6
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    If Fox says so
    Sanity is a full time job

    Puh das war harter Stoff!

  7. #7
    Frenzied Member
    Join Date
    Jan 2000
    Location
    Bellevue, WA, USA
    Posts
    1,357
    However, code runs faster if you don't explicitly state the default property of an object...at least so Im told.
    ~seaweed

  8. #8
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    I will test this, but I can't believe it. Maybe, the compile time would be increased 0.000000000001 seconds if you do it all over your code, but I can't imagine, that the program would be slower.
    Sanity is a full time job

    Puh das war harter Stoff!

  9. #9
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    I *think* VB compiles the default property since it doesnt change during runtime, so you will only speed up compiling for 0.000...1 seconds

  10. #10
    Guest
    In other words, it's a matter of preference.

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