Link to home
Start Free TrialLog in
Avatar of vbonduel
vbonduel

asked on

Always on top window (200 pts)

I'd like to an always on top Frame window in an application.
I tried to use toFront when the window loses the focus.
But it doesn't work. Idem in the windowDeactivated function.
How can I do?
Could you give me some code?
Thanx
ASKER CERTIFIED SOLUTION
Avatar of gadio
gadio

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gadio
gadio

note that the TO_TOP_TIME variable determines what is the rate of sending the frame to the top. I set it to 1/10 of a second and it looks good. You can test with other values.
Hope that helps, G.
Avatar of vbonduel

ASKER

Well, it works, but only with Java windows (only with mf1, mf2, mf3 and mf4). With other applications (other windows)it doesn't work. I don't understand why. Have you an answer?
Thanx again.
The Window.toFront() function is implemented by the virtual machine, and on the windows implementation they chose to do that only if the application is in focus. Its an implementation dependent thing. On Unix machines (I checked it on Sun and on Silicon Graphics), the window is always on top.
Thank you.
I think the appropriate grade for you is A =)