Hi all,
I used the code below to programmatically create a system tray icon, this code lives in class file and not on my main form. I have dragged a contextMenuStrip control on to my main form, I now need to link the two but as the control if private I can't see it. What is the best way to link these two?
trayIcon = new NotifyIcon();
trayIcon.Icon = mainForm.Icon;
trayIcon.Text = "Test";
trayIcon.MouseDoubleClick += new MouseEventHandler(this.trayIcon_MouseDoubleClick);
trayIcon.ContextMenuStrip = //help needed here???
Thanks all