Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim fm() As Form = {Form2, Form3, Form4} Dim w(fm.Length - 1) As Integer SetWidth(fm, w, 0) End Sub Private Sub SetWidth(ByVal fm() As Form, ByVal w() As Integer, ByVal index As Integer) If index < fm.Length Then w(index) = fm(index).Width SetWidth(fm, w, index + 1) End If End Sub