B
Billy
Hello!
I have a main form as MDIContainer in VB.NET 2002 App. Form has menu
which call several forms. I call forms that way:
--
Dim f As New frmNameX()
LoadForm(f)
--
Procedure LoadForm check if form is already loaded.
Private Sub LoadForm(ByVal frmName As Form)
If Not IsLoaded(frmName) Then
MyForms.Add(frmName) 'Add form to collection list
frmName.MdiParent = Me
frmName.Show() 'Display form on screen
Else
'Bring already open form in focus before other forms
'???? How
End If
End Sub
IsLoaded is function which return True if is loaded and False if it
isn't.
I have more then 20 forms so has to be checked all through one
procedure without defining each forms as separate variable and then
reference on that variable.
I tryed all combinations I know with Activate, Focus, TopLevel, TopMost
etc. without success.
I also have in menu "Window" (set as MDIList=True) where I select
already open form and that work fine. I would like to have the same way
if user would select in my menu same form again.
I think I missed one important step, but don't know which one. Can
anybody help me with that problem?
Regards,
Billy
I have a main form as MDIContainer in VB.NET 2002 App. Form has menu
which call several forms. I call forms that way:
--
Dim f As New frmNameX()
LoadForm(f)
--
Procedure LoadForm check if form is already loaded.
Private Sub LoadForm(ByVal frmName As Form)
If Not IsLoaded(frmName) Then
MyForms.Add(frmName) 'Add form to collection list
frmName.MdiParent = Me
frmName.Show() 'Display form on screen
Else
'Bring already open form in focus before other forms
'???? How
End If
End Sub
IsLoaded is function which return True if is loaded and False if it
isn't.
I have more then 20 forms so has to be checked all through one
procedure without defining each forms as separate variable and then
reference on that variable.
I tryed all combinations I know with Activate, Focus, TopLevel, TopMost
etc. without success.
I also have in menu "Window" (set as MDIList=True) where I select
already open form and that work fine. I would like to have the same way
if user would select in my menu same form again.
I think I missed one important step, but don't know which one. Can
anybody help me with that problem?
Regards,
Billy