-
Is there anyway to resize a picture box to the so all controls inside it will fit ?
Or how do I do this in a usercontrol ?
Please if there is a way to do this in a picturebox, help me with that, and if there isn't any way to do it with a picturebox, help me with the usercontrol, please!
-
Code:
Private Sub UserControl_Resize()
Dim a As Object
For Each a In UserControl.ContainedControls
If a.Width + a.Left > UserControl.Width Then UserControl.Width = a.Left + a.Width
If a.Height + a.Top > UserControl.Height Then UserControl.Height = a.Top + a.Height
Next a
End Sub