We help IT Professionals succeed at work.

Want my application form on top all the time

ginsonic
ginsonic asked
on
288 Views
Last Modified: 2010-04-05
i have a game (GW, WOW, ..name it how wish)  that run in full screen. in same time i run my application. but allways when i activate the game my form is behind and can't show it on top. how can i program my from to be ALWAYS ON TOP. I want to display a clock all the time over any application.

don't tell me to set my form to be showed on top :). not enough!
Comment
Watch Question

Top Expert 2004

Commented:
??

usual it should be enough to set the formStyle to fsStayOnTop
(of course it must be the mainForm!)

meikl ;-)

Author

Commented:
is not. when start the game my form is somewhere on back.

Author

Commented:
work just if I set the game to run in a window. else if is maximized the gave fill the screen and my windoe diseapear.
Top Expert 2004

Commented:
well, then your game run in another device-context and not maximized on your window-desktop
--> if so, no chance

meikl ;-)

Author

Commented:
http://www.xfire.com/ can do it :)

Author

Commented:
Hm, the experts ladder is different from my last visit here ( one year ago :P  )

Author

Commented:
and how i see my avatar isn't set as guru ( my rank on Ex-Ex ).

Sorry for off topic comments. But happy to back here :)
Top Expert 2004

Commented:
phew, this is out of my expirience, but guess, there is a lot more to do, to get it work

sorry, so i'm out of help in this case

about your avatar --> questioners are so displayed, regardless about its expert-state
(if you comment on a q not owned by yours, you should see your guru-state)

meikl ;-)
OnShow event, put this code

SetWindowPos(Form1.Handle,
              HWND_TOPMOST,
              0, 0, 0, 0,
              SWP_NOMOVE or SWP_NOSIZE or SWP_SHOWWINDOW);

This will stay the form always on the top.
Software Developer
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
yes, this is the problem and solution :) any idea how can do that?

Try this component:

http://www.torry.net/vcl/forms/other/topwin.zip.

It stays OnTop even when it's not focused.

Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.