I'm currently working on a program which will provide a quick easy interface to all databases for a small company. Logically i decided to start at the Menu Strip.
The first item in the menu strip under File is Minimize to Tray. So i created a form named frmSystemTray and placed a Notify Icon (ntiSystemTray) in it, declared both as Public. When i go back to the main form frmMain and access the code snippet for the Minimize to Tray menu item and attempt frmSystemTray. i do not get ntiSystemTray in the intellisense menu. I'm receiving an error that reference is required to a non static object though honestly I'm just a beginner and not too sure how to fix this. I actually spent two hours on the phone with my boss today attempting different things but he is more fluent in VB then C#.
private void frmManagementTracker_Resize(object sender, EventArgs e)
{
if (FormWindowState.Minimized == this.WindowState)
{
frmSystemTray.ntiSystemTray.Visible = true;
frmSystemTray.ntiSystemTray.ShowBalloonTip(500);
this.Hide();
}
else if (FormWindowState.Normal == this.WindowState)
{
frmSystemTray.ntiSystemTray.Visible = false;
}
}
Any and all help appreciated, Thank you.

New Topic/Question
Reply




MultiQuote



|