Page 1 of 1

[SOLVED] Window foreground but not foreground?

Posted: Fri Jun 13, 2025 8:33 am
by Randy Walker
Anybody know if/how a Window could be made to be in foreground on top of window that is actually the foreground? Not looking for transparency. Just want to make one app window overlay on top of the app window that is truly operating as the foreground window without it taking focus away from that foreground window. Hope that makes sense.

Re: Window foreground but not foreground?

Posted: Fri Jun 13, 2025 8:37 am
by BarryG
Your app's own windows? It's the StickyWindow() command.

Re: Window foreground but not foreground?

Posted: Fri Jun 13, 2025 8:46 am
by Randy Walker
BarryG wrote: Fri Jun 13, 2025 8:37 am Your app's own windows? It's the StickyWindow() command.
WOW!! Fast reply. But these are two separate PB apps. Is that still possible?

Re: Window foreground but not foreground?

Posted: Fri Jun 13, 2025 8:50 am
by BarryG
For Windows:

Code: Select all

SetWindowPos_(hWnd,#HWND_TOPMOST,0,0,0,0,#SWP_NOMOVE|#SWP_NOSIZE)
hWnd = Handle of the external window, obtained with things like FindWindow_() or GetForegroundWindow_().

Re: Window foreground but not foreground?

Posted: Fri Jun 13, 2025 8:50 am
by Randy Walker
Randy Walker wrote: Fri Jun 13, 2025 8:46 am
BarryG wrote: Fri Jun 13, 2025 8:37 am Your app's own windows? It's the StickyWindow() command.
WOW!! Fast reply. But these are two separate PB apps. Is that still possible?
Yes it looks like it should do the trick. Will mark this [Solved] if it does work out for me.
BIG THANKS!!! BarryG

Re: Window foreground but not foreground?

Posted: Sat Jun 14, 2025 3:10 am
by Randy Walker
BarryG wrote: Fri Jun 13, 2025 8:37 am Your app's own windows? It's the StickyWindow() command.
Yes both apps are my own PB apps/windows.
StickyWindow() was the perfect solution.

Re: Window foreground but not foreground?

Posted: Sat Jun 14, 2025 3:14 am
by Randy Walker
BarryG wrote: Fri Jun 13, 2025 8:50 am For Windows:

Code: Select all

SetWindowPos_(hWnd,#HWND_TOPMOST,0,0,0,0,#SWP_NOMOVE|#SWP_NOSIZE)
hWnd = Handle of the external window, obtained with things like FindWindow_() or GetForegroundWindow_().
Not applicable in my case but it's a good post. Thanks, anyway. You always go above and beyond.