Results 1 to 4 of 4

Thread: Saving a Picture Box is Failing ??????

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2001
    Location
    Ball
    Posts
    5
    Hi Guys (again

    Sorry, here's what I want to do...

    Load an image, resize it, save out the thumbnail, now to me this seemed like a trvial task indeed... So why doesn't the savepicture work after the image has been scaled ?

    I works perfectly, If i save the picturebox before the scale....... I'm sorry i'm new to VB, but have spent half my life working in 680x0 asm on Amiga's, sigh I just don't get this (i have a list a mile long..of things i don't understand about VB)..


    Picture1.Visible = False
    Picture1.Picture = LoadPicture(sFile)

    Dim Width As Integer
    Dim Height As Integer
    Width = 200
    Height = 100

    ' ' Set pictures box to pixels

    Picture1.ScaleMode = 3
    Picture2.ScaleMode = 3

    Picture2.PaintPicture Picture1.Picture, 0, 0, Width, Height, 0, 0, Picture1.ScaleWidth, Picture1.ScaleHeight

    SavePicture Picture2.Picture, "D:\TestSave.bmp"
    Cya,
    Kevin Picone

  2. #2
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    If you have autoredraw set to true on anything, you must refresh the picture before you can use savepicture.

    (it's a nightmare!!!)

    But VB is fun all the same, once you get the hang of it.
    Listen to the good people: Kedaman, Megatron, Fox, SteveCRM, and even me

    Lots of people here know a lot so help him out people!
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2001
    Location
    Ball
    Posts
    5
    Sorry guys,

    Never mind I just worked it out, If I enable Auto Redraw on picturebox 2 it now works fine........... Even makes sense
    Cya,
    Kevin Picone

  4. #4

    Thread Starter
    New Member
    Join Date
    Feb 2001
    Location
    Ball
    Posts
    5
    Sastraxi,

    Thanks man, I appreciate your help a great deal !!.

    I'm starting to get the hang of this... it's just taking a while...
    Cya,
    Kevin Picone

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