Click here to Skip to main content
15,887,936 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I searched on Google, but I couldn't find what I wanted.
I am making an app for a game, which will overlay some text in the centre of the screen, at the bottom, but I can't seem to figure it out, the text will be 16 characters maximum, and needs to be loaded from my labels output text.

Is there a way I can do this in C#? If so, could someone please tell me how?
Posted
Comments
Sergey Alexandrovich Kryukov 26-Sep-11 22:57pm    
Tag it: WPF, Silverlight, Forms, what?
--SA

1 solution

The question shows that you don't develop using WPF, that's why you have problems with overlays. Why? WPF itself is totally based on DirectX. One consequence is this: there is no a notion of overlay as anything can be "overlayed" on anything; anything at all. You can put any control on top of video clip, for example.

You did not ask anything about concrete UI library of foundation, the question was "do this in C#", so this is the answer, one of the possible ways, the easiest one, in fact.

—SA
 
Share this answer
 
Comments
PirateEggs 26-Sep-11 23:55pm    
I am not sure if you understood me correctly, or I am not understanding you.
I am trying to put text, ontop of a game, which uses DirectX, (like most games), not make a game or anything.

I sort of need to make a HUD, but with only text (which is label text), is there a simple way to do this?

Or overlay a C# Windows Form on top of a fullscreen game, I can do it windowed, but not fullscreen.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900