20

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

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
Clarke Abear
  • 201
  • 1
  • 2
  • 3
  • Yh I tried but it didn't work for me :/ – Clarke Abear Jun 03 '13 at 00:37
  • 2
    Messing with the default style of windows in your application is: not cool, not hip, not useful, not mature. Sure, change the text to be more useful / informative, but don't do anything else. – user3791372 Apr 04 '16 at 23:12

3 Answers3

29

Use the Console.Title property

Check out this link for an example Console.Title Property

Sachin Joseph
  • 18,928
  • 4
  • 42
  • 62
Andrew Cumming
  • 965
  • 6
  • 14
2

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.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
0

Use the SetConsoleTitle API. With P/Invoke I would guess.

vga None
  • 73
  • 2
  • 6