When I launched the application a console window appeared. And how to achieve that when there is a team

System.Diagnostics.Process.Start("путь к exeшнику"); 

But so that the application does not show its black window and work in the tray until a line appears in this black window (Ie event), for example?

  • where does the string appear from? Try to describe the problem in more detail .. - 4per
  • one
    First of all, you should find out the difference between the console and the window application. - VladD
  • @ 3per for example, I registered the code that is in words like this, the software (console application) is running, and after 5 minutes a line 123 appears on the screen (as an example) and while this line is NOT appeared, the software works but it works in the tray and not on the panel tasks, and as soon as 123 software appeared, it appeared as if I had launched it directly from VS 2013 - komra23
  • one
    @VladD console -ConsoleApplication window WindowsFormApplication - komra23

1 answer 1

Add a NotifyIcon element to your NotifyIcon application NotifyIcon set an icon in the Icon property there. In 2 events list:

 private void Form_Resize(object sender, EventArgs e) { if (this.WindowState == FormWindowState.Minimized) { this.Hide(); notifyIcon1.Visible = true; } } private void notifyIcon_MouseClick(object sender, MouseEventArgs e) { this.Show(); this.WindowState = FormWindowState.Normal; notifyIcon1.Visible = false; } 

If you want the application not to be shown immediately, you can make the form invisible in the properties / initialization.