Keeping a window on top
BlitzMax Forums/BlitzMax Programming/Keeping a window on top
| ||
I'm trying to write a program that will allow me to track in-game stats/information in a game I play. Is there a way in which i can make my small blitz window stay on top of the fullscreen game so that I can interact with it while the game is running. Thanks in advance. |
| ||
If you have maxgui and you are on windows, this works:Const HWND_TOP:Int = 0 Const HWND_TOPMOST:Int = -1 Function AlwaysOnTop(gad:TGadget,mode:Int=HWND_TOP) Local hwnd:Int = QueryGadget(gad,QUERY_HWND) SetWindowPos( hwnd,mode, 0,0,0,0, SWP_NOMOVE|SWP_NOSIZE) End Function Local win:TGadget = CreateWindow("yo",100,100,100,100) AlwaysOnTop(win,HWND_TOPMOST) While WaitEvent() If EventID() = EVENT_WINDOWCLOSE End EndIf Wend |
| ||
I don't think an "always on top" window would be above a full-screen app. It would be above a maximized window, but not a full-screen app. If you can run your full screen app as a maximized window, then it would be possible. That is what I normally do when playing gamnes, except I have two monitors, so I can run other programs on the other monitor. But the full screen app has to be a maxmimzed window so I can move my mouse to the other screen. |