Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
setting program to display always on top of other windows without having the focus?
#9
(05-19-2024, 04:35 PM)Steffan-68 Wrote:
(05-19-2024, 03:24 PM)madscijr Wrote:
(05-17-2024, 11:27 PM)SMcNeill Wrote: https://qb64phoenix.com/qb64wiki/index.p...ost_Window
Fantastic!

Now once the program window is set to always be in the foreground, how would you change it back to a normal window? 

I tried modifying my programs so 
a window stays on top (HWND_TOPMOST) when the user presses the "a" key, 
and goes back to normal (HWND_NOTOPMOST) when they press "b", 
but it doesn't seem to be working...

But your programs are fine.
If you press key B the window is no longer in the foreground and with A it is in the front again.
All you have to do is click on it with the mouse to give the program focus again, and then press the corresponding keys.
And the second program should not be in the same place as the first.
The function brings the window to the foreground, but does not hold the focus.
Thanks for your reply - I'm away from my PC now but what I was seeing (in Windows 11) 
was that alt-tabbing to the program not set to "top" (or even clicking it), it moved to the top. I would expect the one not on top to stay underneath. I'll give it a look when I'm back at the computer - thanks again.
Reply


Messages In This Thread
RE: setting program to display always on top of other windows without having the focus? - by madscijr - 05-19-2024, 05:42 PM



Users browsing this thread: 3 Guest(s)