I have an issue with currently activated forms not displaying on top when menu option is clicked again.
Contains my main menu
IsMDIContainer = true
It is activated from menu option on MainMenuForm with the following code:
Dim frm As New CriteriaForm
frm.MdiParent = Me
DataEntryForm - Specific Table Data Entry Form
It is shown from double-click of record on datagrid from CriteriaForm with the following code:
Dim frm As New DataEntryForm
frm.MdiParent = Me.MdiParent
This is how I would like the flow of things to go:
If both CriteriaForm and DataEntryForm are open and DataEntryForm is on top, I would like for
the menu option click to show the CriteriaForm to cause it to be on top of the DataEntryForm.
Likewise, if I double-click on a row of the datagrid on CriteriaForm I would like for the DataEntryForm
to return to the top at which time I would change the rowdata displayed on the form.
I also have a button on the DataEntryForm that I would like to enter on_click code into to show
the CriteriaForm back on top.
I can't use 'Dim frm As """NEW""" CriteriaForm or DataEntryForm because needless to say I get
multiple instances of the form already displayed.
I've tried options like TopMost to no avail. I also read another thread from the form regarding
setting focus to the Criteria Form....to no avail. I'm assuming that the parent/child relationship
between these three forms is the issue.
Is it possible to set the MainMenuForm as the MDIContainer & parent of all other forms in my
application and control them programmatically? If not how do I resolve this problem with the
current setup of my code?