Hi,
Both the methods below open up a windows form called MasterForm. However, one works better than the other. Method 1 opens the form correctly but I don't have any reference to the instance of master form. Method 2 opens the form but when I right click on the Notify Icon I don't get the context menu that I should be seeing. I can interact with the main form window but I cannot interact with the NotifyIcon. Method 2 gives a object reference that I require (masterForm) where as method 1 doesn't.
Any Ideas Anyone?
Method 1:
class FormHandler
{
public void ShowForm()
{
Application.Run (new MasterForm());
}
}
Method 2:
class FormHandler
{
private static MasterForm masterForm = new MasterForm();
public void ShowForm()
{
Application.Run (masterForm);
}
}
Thanx Josh
Both the methods below open up a windows form called MasterForm. However, one works better than the other. Method 1 opens the form correctly but I don't have any reference to the instance of master form. Method 2 opens the form but when I right click on the Notify Icon I don't get the context menu that I should be seeing. I can interact with the main form window but I cannot interact with the NotifyIcon. Method 2 gives a object reference that I require (masterForm) where as method 1 doesn't.
Any Ideas Anyone?
Method 1:
class FormHandler
{
public void ShowForm()
{
Application.Run (new MasterForm());
}
}
Method 2:
class FormHandler
{
private static MasterForm masterForm = new MasterForm();
public void ShowForm()
{
Application.Run (masterForm);
}
}
Thanx Josh
Comment