Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to change a console window's icon from .net?

Tags:

Is it possible to change a console window's icon from .net? Without using win32 calls.

like image 475
Eric Haskins Avatar asked Aug 17 '09 01:08

Eric Haskins


People also ask

How do I change the Icon on the console app?

To summarize right click on your project (not the solution) in Visual Studio and select properties. At the bottom of the "Application" tab there is a section for "Icon and manifest" where you can change the icon.

What allows the window to stay up when running a console app?

Keep Console Open With the Ctrl + F5 Shortcut in C# The best approach for keeping our console window open after the execution of code is to run it with the Ctrl + F5 shortcut of the Microsoft Visual Studio IDE.


1 Answers

If it is your own application's console window, then you can...

  1. Double-click on "Properties" under your console project in Solution Explorer
  2. Select the option "Icon and manifest"
  3. Add your icon in that panel.

(I'm assuming you are in a C# environment, but VB.NET should be similar)

If you are starting an external process... then you can make a "launcher" console project to which you can set your own icon the same way as above.

If you mean an externally owned console window that you don't have control over... then I think you do need win32/pinvoke call.

like image 69
chakrit Avatar answered Oct 15 '22 12:10

chakrit