C#

  • Thread starter Thread starter Nazeer
  • Start date Start date
N

Nazeer

I have an MDI Form in which I placed toolbar buttons
Save,Delete etc.
I have other forms also having the function like Save,
Delete
Suppose I want to open a particular form and save the data
to database using the toolbar buttons.
How do I know at runtime which forms is currently opened
and how to access that form functions such as Save, Delete
etc.

Please help me
thanx
 
You can use the MDIChildren property of the MDIParent form:

In your loop you should check the type of each form. If the types matches
the type of your "special" form, then you can use the method:

For Each form As Form In Me.MdiChildren
If form.GetType Is GetType(Form1) Then
CType(form, Form1).MyMethod()
End If
Next

--
Greetz

Jan Tielens
________________________________
Read my weblog: http://weblogs.asp.net/jan
 
Back
Top