Code:
Dim a As Windows.Forms.Control
For Each a In RichTextBox1.Controls
Debug.WriteLine(a)
Rect1 = New Rectangle(a.Location.X, a.Location.Y, a.Size.Width, a.Size.Height)
Dim a As Windows.Forms.Control
For Each a In RichTextBox1.Controls
Debug.WriteLine(a)
Rect1 = New Rectangle(a.Location.X, a.Location.Y, a.Size.Width, a.Size.Height)