Window always on top?

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by cor.

Is there a way to make the active window allways on top of other windows?

Registered user of PB

C. de Visser
Author of Super Guitar Chord Finder
http://www.ready4music.com
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Franco.

Yes!

Procedure FrontWindow(WindowID)
Pos.RECT : GetWindowRect_(WindowID,Pos)
SetWindowPos_(WindowID,#HWND_TOPMOST,Pos\left,Pos\top,WindowWidth(),WindowHeight(),0)
EndProcedure

Call this procedure with:

FrontWindow(WindowID())

after you open your window.

BTW if you go to Paul's resource site you will find a lot of snippets, also my templates for window manipulations... (this procedure is there as well...)


Have a nice day...
Franco

Sometimes you have to go a lonely way to accomplish genius things.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Paul.

Here's the command but you might want to do a search of the Forum next time... lots of the questions now have already been answered somewhere.

SetWindowPos_(WindowID(),#HWND_TOPMOST,0,0,0,0,16|2|1)




Edited by - paul on 24 January 2002 18:55:49
Post Reply