Results 1 to 3 of 3

Thread: [RESOLVED] Problem with picturebox

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2006
    Posts
    147

    Resolved [RESOLVED] Problem with picturebox

    Hi All

    I'm trying to get two pictures to be displayed and saved - One small and one big

    The big one is to be the snaphot of the form (this all works btw) then the smaller picture box to view what is in the bigger box but on a smaller scale

    I was thinking of using the line of code:

    Code:
    Me.Picture2.PaintPicture Picture1.Picture, 0, 0, Picture1.ScaleWidth, Picture1.ScaleHeight
    but it doesn't work - Any ideas???

    I've made a sample (see attachment)
    Attached Files Attached Files

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Problem with picturebox

    vb Code:
    1. Set Picture1.Picture = Picture1.Image
    2.     Picture2.PaintPicture Picture1.Picture, 0, 0, Picture2.ScaleWidth, Picture2.ScaleHeight
    you also need to set picture1.autoredraw to true
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Apr 2006
    Posts
    147

    Re: Problem with picturebox

    Thanks

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