Control child object form Parent (MDI)

hadinatayp

Well-known member
Joined
Feb 8, 2006
Messages
95
Programming Experience
Beginner
anyone please help!

how to control an object from parent in MDI form suppose,
I have (only) a rich text object in child form,and i want to control the font size,color,family from the parent form.

Thx.
 
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim oForm2 As New Form2
Dim x As Control
For Each x In oForm2.Controls
If x.Name = "RichTextBox1" Then
x.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold)
x.Text = "HAIHAIHAI"
End If
Next
oForm2.Show()
End Sub
 
Back
Top