Per le forms figlie puoi scorrere:
For Each frm As Form in me.MdiChildren
..
Next
per aprire una form child testando prima che non sia nella lista:
Public Sub ShowChild(ByVal FormType As Type)
Dim TargetForm As Form = Nothing
For Each child As Form In Me.MdiChildren
If child.[GetType]().Equals(FormType) Then
TargetForm = child
End If
Next
If TargetForm Is Nothing Then
TargetForm = DirectCast(Activator.CreateInstance(FormType), Form)
TargetForm.MdiParent = Me
End If
TargetForm.Show()
End Sub
--
-----------------------------------------------------------------
Bastianello Luciano - MBS CP Development
Software Consultant - Apprentice Sorcerer
MSN: ***@hotmail.com - ICQ: 209754422
http://community.visual-basic.it/LucianoB/
-----------------------------------------------------------------
Post by AndreaPost by EnricoIn un'applicazione non MDI prima di aprire un form vorreri verificare se è
già aperto.
Come posso fare ?
In VB6 puoi guardare se lo trovi nella collection Forms. In .Net non so se
c'è qualcosa di simile
Dim frm As Form
For Each frm In Forms
if frm.Name=tuonome then
...
Next
--
DBMS Firebird
VB6 + Ado