Always on top?

Blitz3D Forums/Blitz3D Programming/Always on top?

Colvette(Posted 2004) [#1]
Anyone know an easy way to make a window "always on top"?

I'd sooner use internal blitz stuff only, if poss, as at the moment, I'm unsure how to use windows based DLL's.

Can anyone help me?

Thanks!


SoggyP(Posted 2004) [#2]
Hi Folks,

I was about to answer "Yes, she is." but thought better of it ;0)

Later,

Jes


Colvette(Posted 2004) [#3]
Anyone? :)


Colvette(Posted 2004) [#4]
Right - I found a solution myself. If you use User32.dll, there is a command called "SetWindosPos".

Adding the following line to "User32.decls" will allow you to use it:

User32_SetWindowPos%(hwnd1%, hwnd2%, x%, y%, cx%, cy%, uflags% ): "SetWindowPos"

Then, after initially displaying the window, call the function with "hwnd2" set to -1.

That will make the window "always on top".

:)


electronin(Posted 2004) [#5]
You could use SetForegroundWindow, also from user32.dll:
SetForegroundWindow%(hwnd%):"SetForegroundWindow"