reyboysapphire84
Programmer
I have a module named: MGlobals in here i declare a variable
General Declarations
Option Explicit
Public g_FocusMe As Boolean
then I have a MDIParent Named: mdiMMC here i declare the code:
-------------------------------------------------
Private Sub MDIForm_Activate()
If g_FocusMe = True Then
On Error Resume Next
frmMMCModuleNavigator.tvwssMenu.SetFocus
g_FocusMe = False
End If
End Sub
------------------------------------------------
Private Sub MDIForm_Deactivate()
g_FocusMe = True
End Sub
------------------------------------------------
Then I have a form named: frmMMCModuleNavigator
Private Sub tvwssMenu_DblClick()
Form1.Show
End Sub
This module navigator have a treeview that has a list of forms that when you lick the list, the MDIChild would appear.
Then in my MDI Child I declare the code:
Private Sub Form_Activate()
g_FocusMe = False
Me.ZOrder 0
End Sub
------------------------------------------------
Private Sub Form_Load()
g_FocusMe = False
End Sub
------------------------------------------------
When I click the form it would appear and the focus of the cursor is on the form, then i would click another form from the module navigator it would appear also but when I go back from the previously access form the cursor did not focus on that form but instead it focuses on the module navigator form. Please help me on this.
General Declarations
Option Explicit
Public g_FocusMe As Boolean
then I have a MDIParent Named: mdiMMC here i declare the code:
-------------------------------------------------
Private Sub MDIForm_Activate()
If g_FocusMe = True Then
On Error Resume Next
frmMMCModuleNavigator.tvwssMenu.SetFocus
g_FocusMe = False
End If
End Sub
------------------------------------------------
Private Sub MDIForm_Deactivate()
g_FocusMe = True
End Sub
------------------------------------------------
Then I have a form named: frmMMCModuleNavigator
Private Sub tvwssMenu_DblClick()
Form1.Show
End Sub
This module navigator have a treeview that has a list of forms that when you lick the list, the MDIChild would appear.
Then in my MDI Child I declare the code:
Private Sub Form_Activate()
g_FocusMe = False
Me.ZOrder 0
End Sub
------------------------------------------------
Private Sub Form_Load()
g_FocusMe = False
End Sub
------------------------------------------------
When I click the form it would appear and the focus of the cursor is on the form, then i would click another form from the module navigator it would appear also but when I go back from the previously access form the cursor did not focus on that form but instead it focuses on the module navigator form. Please help me on this.