Grant,
I use almost the same and than with this routine to activate the forms from
the toolbar.
frmName is a string which is passed from the toolbar in a case select
This is a snippet from a larger routine
(And as adivice do not use the term "code behind" that gives direct the idea
that you are talking about a webform, what is in this case of course obvious
not).
I hope this helps?
Cor
\\\
Private Sub mnuFrmHandling(ByVal frmName As String)
For Each frm As Form In Me.MdiChildren
If frm.Name = frmName Then
frm.BringToFront()
Exit Sub
End If
Next
Dim frmNew As Form
Select Case frmName
Case "Persons"
frmNew = New frmPersons
Case Else
frmNew = New frmStandard(frmName)
End Select
frmNew.MdiParent = Me
frmNew.Show()
frmNew.WindowState = FormWindowState.Maximized
frmNew.Name = frmName
frmNew.BringToFront()
End Sub
///
"Grant Stephen"
...
Hi
just getting to grips with vb.net and am struggling to solve a mdi prob:-
i have a main form which has a tool bar,
i would like to acess the child forms code via the mdi toolbar alowing me
to have multiple instances of the child form open and manipulate the data
within them seperatly ie
the toolbar runs the code behind the active child
thanks
Grant