Easy way to display text fullscreen.

Posted on 2006-03-21
Last Modified: 2010-04-07
Hi People,

Although this question is not about a game, I'm posting it here as I'm guessing that you guys will be able to give me a better answer than any of the other channels.

Basically I'm looking to write an app to display text in fullscreen that can then be displayed on a TV through the TV-out port of a graphics card. The purpose is to display system statistics for a whole bunch of machines. All it needs to do is be able to read a text file and then display the data to the screen, and be capable of rotating through a number of screens to show different statuses.

Can anyone give me any pointers? - I'm guessing the best approach is a simple app in C to read the files - but I'm not sure how I'd then go about displaying the text in fullscreen. Perhaps I could make use of some sort of game engine to do the job?

Question by:lorddef
    LVL 52

    Expert Comment

    by:Carl Tawn
    You haven't mentioned which language you are using, so this will be a very generic answer.

    DirectX or OpenGL is an option, you won't need anything as complex as a game engine though. You can create a fullscreen device and then just draw text to it.

    Alternatively, is a full window Windows app an option ? You can switch off all the borders etc so that it looks like its fullscreen, but you wouldn't have the extra complexity of having to figure out DirectX or OpenGL.
    LVL 1

    Author Comment

    Cheers for the response.

    I hadn't specified a language as at the moment I'm open to ideas, although I have already ruled out the idea of a php script and a web browser in fullscreen.

    A full window windows app sounds like it'd do the job, I've got visual studio here. Any further pointers on this? or should I go off and swat up myself?
    LVL 52

    Expert Comment

    by:Carl Tawn
    Visual Studio 6 or .Net ?

    If its .Net, then a sample using C#. Create a new windows application, then in the constructor for the main form add the following:

                this.WindowState = FormWindowState.Maximized;
                this.FormBorderStyle = FormBorderStyle.None;
                this.BackColor = Color.Black;
                this.ControlBox = false;
                this.Text = "";

    This will give you a fullscreen borderless black window. You can then use the objects provided in the System.Drawing namespace to draw shapes, write text, etc.
    LVL 1

    Author Comment

    I only have beta versions of both 6 and .Net 2k5, and I'll have a look at this as soon as I get chance.

    Is there anyway I could impliment this so I can maximise the window and have it as above, and restore the window to have it with its boarders?

    Cheers for the tips.
    LVL 52

    Accepted Solution

    No problem, it just depends on how you want to do it, key combination or button, etc.

    Essentially you just need to resize the form and set its FormBorderStyle to something other then None.

    Assisted Solution

    I would suggest using DirectX and C++ to achieve this for two reasons:

    1) DirectX has pre-built samples to start projects from, a few of which include text classes to specifically display text across on the screen more easily with definable font, color, etc. Otherwise, you could build a wrapper class around the pre-made text system to make this simpler and more applied to what you need. This also leaves room for expansion later if you feel like playing around with DirectX graphics.

    2) This way, you can use C/C++ commands to read in your files as well, which would probably be easiest.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Suggested Solutions

    What is RenderMan: RenderMan is a not any particular piece of software. RenderMan is an industry standard, defining set of rules that any rendering software should use, to be RenderMan-compliant. Pixar's RenderMan is a flagship implementation of …
    As game developers, we quickly learn that Artificial Intelligence (AI) doesn’t need to be so tough.  To reference Space Ghost: “Moltar, I have a giant brain that is able to reduce any complex machine into a simple yes or no answer. (http://www.youtu…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    729 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

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now