Results 1 to 2 of 2

Thread: PictureBox Question

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2005
    Posts
    113

    PictureBox Question

    How would I go about making a picture fit to the size of a PictureBox?

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

    Re: PictureBox Question

    Code:
    Private Sub Form_Load()
        Dim lPic As Picture
        
        Set lPic = LoadPicture("D:\tigre.bmp")  'Add Path here
        
        With Picture1
            .AutoRedraw = True
            .PaintPicture lPic, 0, 0, .ScaleWidth, .ScaleHeight
            
            .Picture = .Image 'Just if you want to use Picture1.Picture,
                              'but can use Picture1.Image directly
        End With
    End Sub

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