I found this code in a 5 year old post:
What I've found is that it doesn't work when a status bar is added to the window.
Any ideas on how do do this with a status bar? I've been trying different API calls all night...
Thanks,
; Always On top - example ; Syntax Error ; userlibs ; *********************************** ; .lib "user32.dll ; SetWindowPos%(hWnd%,hWndAfter%,x%,y%,w%,h%,flags%):"SetWindowPos" ; *********************************** Global title$="Always On Top" AppTitle title$ win = CreateWindow(title$,200,100,200,100,Desktop(),3) ;checkbox=CreateButton("Keep me on top of other windows",10,20,200,28,win,2) ;SetButtonState checkbox,True AlwaysOnTop win ; -------------------------- Repeat ev=WaitEvent() ;If ev=$401 AlwaysOnTop win , ButtonState(checkbox) ;EndIf Until ev=$803 End ; -------------------------- ; set/clear the 'AlwaysOnTop' state of a BlitzPlus window Function AlwaysOnTop(bpwin,flag=True) api_SetWindowPos QueryObject(bpwin,1) , -2+flag ,0,0,0,0 , 83 End Function
What I've found is that it doesn't work when a status bar is added to the window.
Any ideas on how do do this with a status bar? I've been trying different API calls all night...
Thanks,