Consulta Sobre Menú

21/01/2005 - 23:22 por David Fúnez | Informe spam
Hola;

Como hago para que un Form no pueda ser abierto más de una vez desde el
menú..?

Saludos y gracias.

David Fúnez
Tegucigalpa, Honduras
 

Leer las respuestas

#1 escarcha56
22/01/2005 - 04:02 | Informe spam
Verifica este codigo. La forma debe ser un child en una
forma mdi...



Dim F As Form, Found As Boolean

For Each F In Me.MdiChildren
If TypeOf (F) Is NombreDeFormaBuscada
Then
'There is already a form for
searching patients open
'give it the focus
MsgBox("Form Already Open",
MsgBoxStyle.Information, "System")
F.Focus()

f.WindowState =
FormWindowState.Maximized
Found = True
Exit For
End If
Next
If Not Found Then
Dim Ad As New NombreDeFormaBuscada
Ad.MdiParent = Me
Ad.ShowDialog()

End If
Hola;

Como hago para que un Form no pueda ser abierto más de


una vez desde el
menú..?

Saludos y gracias.

David Fúnez
Tegucigalpa, Honduras



.

Preguntas similares