Hello, I have a dialog form that I can set always on top with:
The problem is when my application loses focus to another application or the window manager. My on-top dialog form is still on top. Where do I detect that my app loses focus?
My dialog form is sort of like a floating toolbar I have on top of my app that the user can move around...
![[elephant2] [elephant2] [elephant2]](/data/assets/smilies/elephant2.gif)
graabein
Code:
Public Function AlwaysOnTop(bTopMost as Boolean) As Long
If bTopMost Then
AlwaysOnTop = SetWindowPos(Me.Hwnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS)
Else
AlwaysOnTop = SetWindowPos(Me.Hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, FLAGS)
AlwaysOnTop = False '?
End If
End Function
The problem is when my application loses focus to another application or the window manager. My on-top dialog form is still on top. Where do I detect that my app loses focus?
My dialog form is sort of like a floating toolbar I have on top of my app that the user can move around...
![[elephant2] [elephant2] [elephant2]](/data/assets/smilies/elephant2.gif)
graabein