Single Instance Form in a MDI application using VB.NET 2008

Microsoft Visual Studio
Microsoft Visual Studio

MDI Single Instance Form

This code is for how to open only one instance of a child form of a MDI Parent.


Private Sub ShowForm(ByVal fForm As Form)
Dim objForms As Form
For Each objForms In fMain.MdiChildren
If objForms.Name = fForm.Name Then
objForms.Show()
objForms.Visible = True
objForms.Focus()
Return
End If
Next
With fForm
.MdiParent = fMain
.Show()
End With
End Sub

Leave a comment

comments

Be the first to comment on "Single Instance Form in a MDI application using VB.NET 2008"

Leave a comment

Your email address will not be published.


*