how to detect a running form

  • Thread starter Thread starter Maileen
  • Start date Start date
M

Maileen

Hi,

I would like to know how can i detect if a particular form is not already running ?
i have a MDI application and some MID child..but i do not want to have 100 MDI child of the same form, so i need to control it.
please, let me know how to detect is form FSLA is already running or not.

thanks,
Maileen
 
Hi Maileen,
You can do this by dectecting the childform's text value from the parent
form

Private Sub IsFormOpen(ByVal formtext As String) As Boolean
Dim isopen As Boolean = False
Dim i As Integer
Dim myKids As Form()
myKids = Me.MDIChildren
For i = 0 To myKids.Length - 1
If myKid(i).Text = formtext Then
isopen = True
Exit For
End If
Next
Return isopen
End Sub
 

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

Back
Top