Results 1 to 3 of 3

Thread: how to set the same size for two picture box in different form.

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2006
    Posts
    120

    how to set the same size for two picture box in different form.

    i want set two picture box 's size to become same, but these two picturebox are in different form.form 2 picturebox size is refer to form1 picture box size.

    in form1, i have write in code " autosize=true".so, each time , i load the picture in form1, the size of picturebox in form 1 is same as picture size which i load.

    in form 2, i want the picturebox size is same as the form1 but didn't load the picture. how to do that?

  2. #2
    Lively Member
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    80

    Re: how to set the same size for two picture box in different form.

    set a picture in properties of picture1 on form1

    code form1:

    Code:
    Private Sub Form_Load()
        Form2.Show
    End Sub
    code form2:

    Code:
    Private Sub Form_Load()
        Picture1.Width = Form1.Picture1.Width
        Picture1.Height = Form1.Picture1.Height
    End Sub

  3. #3
    Hyperactive Member Jenova's Avatar
    Join Date
    Feb 2006
    Location
    Googleplex
    Posts
    413

    Re: how to set the same size for two picture box in different form.

    Got to it before i did . Here is a small example to show how Ethan37's example works.
    Attached Files Attached Files

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