Open Non-Modal Form from MDI Application

G

Guest

I have an application that has an MDI main page. I would like to open up
multiple non-modal forms for some of the items within that MDI application.
Essentially, I want to open SDI forms from and MDI main application. I have
the forms open, but they don't open up on top and with focus. I need to know
how to have them open on top with focus. Here is the code I have.

Dim exists As Boolean = False
For Each f As Form In My.Application.OpenForms
If f.Tag = nodeTag.Substring(1) Then
exists = True
f.Activate()
End If
Next
If Not exists Then
Dim act As New frmActivities
act.Tag = nodeTag.Substring(1)
act.Show()
act.Activate()
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top