-2

I use a component in my C # application it loads the DLL, an icon appeared in the windows tray, is there any way to hide the icon in tray using the command line or any exe with arguments?

Thanks.

Jean Michael
  • 117
  • 1
  • 2
  • 7

1 Answers1

1

From the command line IMHO its not possible unless the exe supports it, eg:

static void Main(string[] args)
{
if (args.Length > 0)
{
 if (args[0] == "HideFromWindowsTray") 
 { 
  this.ShowInTaskBar = false;
 }
}

You could possibly do it using other techniques, eg have a wrapper exe that launches a exe and sets its ShowInTaskBar form property to False. To get inspiration on how you can do this, see HawkEye - The .Net Runtime Object Editor

ps next to each answer is a holo checkbox, tick it to accept answer and you'll get points too.

Jeremy Thompson
  • 61,933
  • 36
  • 195
  • 321
  • I wanted to say or some other application that I can download to do that which receives arguments, you know something? to me call when my application starts... like: hideapp.exe -hideTray "My App Title" – Jean Michael Apr 22 '12 at 03:06
  • Something like: hideapp.exe -hideTray "Another App Title" – Jean Michael Apr 22 '12 at 15:53