?
Solved

Want my application form on top all the time

Posted on 2007-10-08
12
Medium Priority
?
275 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!
0
Comment
Question by:ginsonic
12 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 20033045
??

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

meikl ;-)
0
 
LVL 9

Author Comment

by:ginsonic
ID: 20033067
is not. when start the game my form is somewhere on back.
0
 
LVL 9

Author Comment

by:ginsonic
ID: 20033074
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.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 27

Expert Comment

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

meikl ;-)
0
 
LVL 9

Author Comment

by:ginsonic
ID: 20033201
http://www.xfire.com/ can do it :)
0
 
LVL 9

Author Comment

by:ginsonic
ID: 20033219
Hm, the experts ladder is different from my last visit here ( one year ago :P  )
0
 
LVL 9

Author Comment

by:ginsonic
ID: 20033237
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 :)
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 20033305
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 ;-)
0
 
LVL 9

Expert Comment

by:sun4sunday
ID: 20038748
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.
0
 
LVL 11

Accepted Solution

by:
ZhaawZ earned 750 total points
ID: 20058708
Err... Games are something different ;) IIRC, you'll have to "modify" some functions that are used to render picture in games - that is not "MS Windows messages" or "window position" stuff. Even more - you have to do it for both DirectX and OpenGL, which are different things - that means that you'll need at least 2 different sollutions (one for dx, one for ogl).

Even if you get your application "on top of game window" (or as a child of game's window), you won't see it. It will physically be there, but dx (or ogl; whichever is used in game) will draw on top of it, so you won't see it. Even if you draw manually your window all the time, it will flicker, because dx and ogl usually draw picture all the time. That's why you need to modify dx/ogl drawing functions to get what you want.
0
 
LVL 9

Author Comment

by:ginsonic
ID: 20063193
yes, this is the problem and solution :) any idea how can do that?

0
 
LVL 1

Expert Comment

by:RuntimeError007
ID: 20068030
Try this component:

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

It stays OnTop even when it's not focused.

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Integration Management Part 2
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question