Link to home
Start Free TrialLog in
Avatar of echobravo316
echobravo316Flag for United States of America

asked on

How can I keep a program window on top?

How can I keep a program window on top?
Avatar of boss302_lp
boss302_lp

do you mean, to keep the focus or to use something like the "always on top" feature in some microsoft apps?
ASKER CERTIFIED SOLUTION
Avatar of boss302_lp
boss302_lp

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Public Sub MakeNormal(hwnd As Long)
  SetWindowPos hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, TOPMOST_FLAGS
End Sub

ooops.....missed that 'T'
you might also want to put the code in a timer that keeps making your app topmost, since if other app make their app topmost your "previous" topmost will be placed behind theirs
Avatar of DanRollins
Moderator, my recommended disposition is:

    Accept boss302_lp's comment(s) as an answer.

DanRollins -- EE database cleanup volunteer