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?
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
1 Attachment(s)
Re: how to set the same size for two picture box in different form.
Got to it before i did :D. Here is a small example to show how Ethan37's example works.