0

I´m using C#, I want to hide the console application but I want to show the icon in "hidden taskbar" (I don´t know if it is the correct name), something similar like Thunderbird, Team Viewer....

enter image description here

I´ve tried this:

[DllImport("kernel32.dll")]
static extern IntPtr GetConsoleWindow();

[DllImport("user32.dll")]
static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);

const int SW_HIDE = 0;
const int SW_SHOWMINIMIZED = 2;
const int SW_SHOW = 5;
const int SW_MINIMIZE = 6;

private const string AppGuid = "c0a76b5a-12ab-45c5-b9d9-d693faa6e7b9";

// ==============================
// ==============================

var handle = GetConsoleWindow();
ShowWindow(handle, SW_HIDE);

But If I hide the console it is not shown in the "Hidden Task Bar". Is it posible to hide the console and show in the "Hidden Task Bar"?

user1253414
  • 249
  • 1
  • 8
  • 17
  • What do you mean with "console application"? Another app or the taskbar icon of your WPF app? – Mighty Badaboom Jul 14 '17 at 09:35
  • My project in C# is Visual C# -> Console Application. I write in the console some information. I´ve updated a picture like example, in the picture thunderbid, team viewer are in the "hidden taskbar" – user1253414 Jul 14 '17 at 09:39
  • 1
    I'm confused: you said you are using WPF... – Mighty Badaboom Jul 14 '17 at 09:41
  • Sorry, I always use WPF, but this is not a WPF application, is a Console application. Now edit the post. – user1253414 Jul 14 '17 at 09:46
  • This link is about WinForms, but the concepts are similar https://stackoverflow.com/questions/995195/how-can-i-make-a-net-windows-forms-application-that-only-runs-in-the-system-tra – Subbu Jul 14 '17 at 09:47

1 Answers1

0

the keyword which you must search for is "notification icon", then you will find something like How to show a message with icon in the notification area i can not explain it more precise because i don't know whether you are using wpf or a console application

anion
  • 1,516
  • 1
  • 21
  • 35