Active MDI Child problem

  • Thread starter Thread starter Omar Abid
  • Start date Start date
O

Omar Abid

Hi

I have an MDI container that contain some MDI Child form

I use the following code to get the active MDI child Text (title) :



Dim activepreview As Form = Me.ActiveMdiChild

If activepreview IsNot Nothing Then

Me.refcode.Text = activepreview.Text ' Get the title

Else

Me.refcode.Text = "No window Selected"

End If



Now I have a Label on the MdiActiveChild I want to change text and
some other properties on this Label.

How can I do this

Thank you

Omar Abid

www.omarabid.uni.cc
 
Omar Abid said:
Hi

I have an MDI container that contain some MDI Child form

I use the following code to get the active MDI child Text (title) :



Dim activepreview As Form = Me.ActiveMdiChild

If activepreview IsNot Nothing Then

Me.refcode.Text = activepreview.Text ' Get the title

Else

Me.refcode.Text = "No window Selected"

End If



Now I have a Label on the MdiActiveChild I want to change text and
some other properties on this Label.

How can I do this


If TypeOf me.activeMdiChild Is TypeOfChild Then
Directcast(me.activeMdiChild, TypeOfChild).Label1.Text = "..."
end if


You can ommit the If+EndIf if you don't have different types of child forms.


Armin
 
Back
Top