Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Customizing the title bar area of a console application

Tags:

Is it possible for me to either customize the title bar (i.e. change colour) or remove it completely?

like image 216
Clarke Abear Avatar asked Jun 02 '13 23:06

Clarke Abear


People also ask

How do I customize the title bar in Windows 10?

Click the Cortana button on the taskbar and enter Control Panel in the search box to open it. Then click Display to open the options shown below. There you can customize the font sizes in Windows. Click the drop-down menu on the left and select Title bars.

How do I change the size of my title bar?

The title bar font can be changed here: control panel > display settings. or: Windows settings > system > advanced display settings > change the size of text and other elements.

How do I change the title bar?

Step 1: Navigate to Settings > Personalization > Colors. Scroll down the page to see Show accent color on the following surfaces option. Step 2: Select Title bars and window borders checkbox. That'ts it!

What is the title bar on a computer?

The title bar at the top of a window displays an application-defined icon and line of text. The text specifies the name of the application and indicates the purpose of the window. The title bar also makes it possible for the user to move the window using a mouse or other pointing device.


2 Answers

Use the Console.Title property

Check out this link for an example Console.Title Property

like image 56
Andrew Cumming Avatar answered Nov 15 '22 11:11

Andrew Cumming


That's not easy to do. The console window is actually handled by a separate process, conhost.exe. You'd need to persuade that process to change its behaviour which would involve gross hacks.

You can obtain the window handle readily enough and change basic properties of the window, and hope that conhost.exe doesn't change them back. But custom painting of the caption bar would involve injecting code into conhost.exe.

like image 20
David Heffernan Avatar answered Nov 15 '22 13:11

David Heffernan