Private Sub Calculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Calculate.Click
Dim NewTextBox As Boolean = True
For Each ctrl As Control In Me.Controls
If TypeOf ctrl Is TextBox Then
If CType(ctrl, TextBox).Text = "" Then
NewTextBox = False
End If
End If
Next
If NewTextBox Then
Dim newtext = New TextBox
newtext.Location = New Point(300, 300)
newtext.Size = New Size(150, 150)
newtext.Text = "ehsan"
Me.Controls.Add(newtext)
End If
End Sub