Tray Icon or Notify Icon


I want automate a process, so I like that rhino’s software is minimiced in tray icon.

How can I do it?

I’m working with Visual Studio 2010 and c#

Maybe you need this.

I like only Tray Icon one rhino’s instance, and I like set notify balloons.

With this program, I can’t do it

I solve this problem.

I write solution’s code:

I need this function:

static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);

public static void MinimizeWindow(IntPtr handle, int estado)
ShowWindow(handle, estado);

this link shows state paramerter value

Show Window parameters

And…for minimized Rhino window I call

MinimizeWindow(Rhino.RhinoApp.MainWindowHandle(), 0);

To set BallonTip, I declare a NotifyIcon in RhinoPlugin

When I want to do the Tray Icon I call this funtion

// Ocultamos la ventana de Rhino
Utils.MinimizeWindow(Rhino.RhinoApp.MainWindowHandle(), 0);

// Mostramos el notifyIcon
System.Drawing.Icon icono = Properties.Resources.Agut;
Plugin.NotifyIcon.Icon = icono;
Plugin.NotifyIcon.Visible = true;
Plugin.NotifyIcon.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(NotifyIcon_MouseDoubleClick);

Call Show Balloon

_notifyIcon.ShowBalloonTip(500, string.Empty, manager.ObtenerMaquina().Nombre + ": Procesando " + _descriptorPieza.ProyectoPadre.FicheroProyecto, ToolTipIcon.Info);