Well, here is an example on how we can detect when ParentForm's properties are changing and then do our stuff...
Private WithEvents _ParentForm As Form
Protected Overrides Sub OnParentChanged(e As EventArgs)
MyBase.OnParentChanged(e)
_ParentForm = Me.ParentForm
Call ParentForm_TextChanged()
Call ParentForm_StyleChanged()
End Sub
Private Sub ParentForm_TextChanged() Handles _ParentForm.TextChanged
If _ParentForm IsNot Nothing Then FormTitle_Label.Text = _ParentForm.Text
Invalidate()
End Sub
Private Sub ParentForm_StyleChanged() Handles _ParentForm.StyleChanged
If _ParentForm IsNot Nothing Then
If _ParentForm.ControlBox = True Then ControlsBox_FlowLayoutPanel.Visible = True Else ControlsBox_FlowLayoutPanel.Visible = False
If _ParentForm.MinimizeBox = True Then MinimizeButton_PictureBox.Visible = True Else MinimizeButton_PictureBox.Visible = False
If _ParentForm.MaximizeBox = True Then MaximizeButton_PictureBox.Visible = True Else MaximizeButton_PictureBox.Visible = False
End If
End Sub