G
Guest
I have a form with an RTF control and I want to use a subform to do "Find and
Replace". Beyond that, I want the subForm to always be on Top when the
Parent form has focus but have it not be on top if neither the subform nor
parent form have focus.
The code that I think should do this is the following. Unfortunately, with
this code, the subForm retains focus. (Me.Focus() is ignored) Is there a
way to have the subform be on top but have the Parent form gain focus?
Private Sub MyForm_Activated(......) Handles MyBase.Activated
If Not Me.mfrmFindReplace Is Nothing Then
Me.mfrmFind.TopMost = True
Me.Focus()
End If
End Sub
Replace". Beyond that, I want the subForm to always be on Top when the
Parent form has focus but have it not be on top if neither the subform nor
parent form have focus.
The code that I think should do this is the following. Unfortunately, with
this code, the subForm retains focus. (Me.Focus() is ignored) Is there a
way to have the subform be on top but have the Parent form gain focus?
Private Sub MyForm_Activated(......) Handles MyBase.Activated
If Not Me.mfrmFindReplace Is Nothing Then
Me.mfrmFind.TopMost = True
Me.Focus()
End If
End Sub