0

I'd like to write an application drawing a certain visual object (e.g. a semi-transparent triangle) over a full-screen game. The game has a "strong on-top" property as it covers all other applications classified as "on top".

I need my application to be the top-most on-top application, and always on focus, without affecting the smooth run of the game behind.

How can this be efficiently accomplished?

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
Bliss
  • 426
  • 2
  • 5
  • 19

1 Answers1

1

It is not possible to make an application that is always on top, because anything you do to make your application top-most, another application could do. Raymond Chen explains this: http://blogs.msdn.com/b/oldnewthing/archive/2011/03/10/10138969.aspx

Jared Shaver
  • 1,339
  • 8
  • 12
  • Thanks. Assume I'm running my application as Administrator (with highest system permissions), whereas the rest of the applications are run at simple user level. Does your answer change? – Bliss Feb 12 '12 at 13:28
  • 1
    It doesn't really matter what the permissions are as the screen is a shared resource. Depending on what the game is doing and what you're trying to accomplish, you might have some luck with creating a DirectX overlay like what Steam does. There's a couple questions around doing this: http://stackoverflow.com/questions/3549004/fullscreen-directx-overlay-yes-again-c-sharp http://stackoverflow.com/questions/2649702/c-sharp-hook-overlay-a-directx-game – Jared Shaver Feb 12 '12 at 14:36