By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,573 Members | 1,752 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,573 IT Pros & Developers. It's quick & easy.

mdi Apps

P: n/a
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
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.