2
votes

How do you put a Windows Form Application on top off everything on your screen?

Just setting the topmost-property isn't enough when you're running fullscreen games.

If anyone has a solution for good old Forms i'll also be happy

I've seen many posts on this forum that say it's impossible but i know it's not couse i've seen alot of apps (fraps, teamspeak overlay, xfire, etc) that does this.

1
Imagine if two applications tried to do this at the same time blogs.msdn.com/b/oldnewthing/archive/2011/03/10/10138969.aspxPete Baughman
Fraps is doing this via DirectX/OpenGL. If you're willing to use a low level graphics API it is possible, but not really in a regular windows form (excluding Form.TopMost).Nathan
Are you using MS-windows?ctrl-alt-delor
Comedy option : Take a screenshot of the Windows Form application, print it out, tape it to your screen. Serious comment - Nathan is right, but glosses over the fact that this might be waaaaay easier in an unmanaged language other than C# where you have a lot more control over painting. I doubt that teamspeak uses Winforms to do their thing - they probably had to roll a lot of their own drawing logic.Pete Baughman
@PeteBaughman That's definitely true, in other languages this may be much more doable. I'm just speaking in the context of windows forms, since that's what was asked.Nathan

1 Answers

1
votes

If you want to use a graphics library to display something always on screen, you may want to start here on SO. There are wrapper libraries available like OpenTK for OpenGL. If you want to go the DirectX route you'll need to load in the C++ libraries and access them using P/Invoke. There's a good tutorial to start with on msdn. Wrappers for DirectX also exist in the form of SharpDX.