Console title bar - .net 1.1

Posted on 2006-04-04
Last Modified: 2010-10-05

Probably a nice easy question.

How can you change the text in the title bar of a console application using .net 1.1?
I've seems you can use Console.Title in .net 2.0, but it's not available in .net 1.1, which I need to use for this project.

Question by:Jivlain

    Author Comment

    Never mind, I found it myself.

     using System.Runtime.InteropServices;

    inside class, import a function from a DLL:
     public static extern bool SetConsoleTitle(String lpConsoleTitle);

    finally, call the function from within the class:
     SetConsoleTitle("Hello world!");

    Accepted Solution

    Closed, 125 points refunded.
    The Experts Exchange
    Community Support Moderator of all Ages

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
    Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    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…

    730 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

    15 Experts available now in Live!

    Get 1:1 Help Now