A
Andrew Kilgore
Hi all,
Today is my first day at programming using .NET so please excuse if my
question seems trivial.
(All previous coding done with C++/MFC)
My aim is to create an application (consisting of a single form) which, when
started, will place an icon in the system tray and allow me to interact with
the application/main form via a context menu. No problems with this...
The problem is that when the applications starts, the main form (which
creates the tray icon etc.) is displayed. I don't want this - instead I only
want the main form to be made visible when the user selects the appropriate
item from the tray icon's context menu.
I've tried setting the form's 'Visible' property to false and also calling
it's 'Hide()' method during the form's creation but without luck. It seems
as if the line:
Application.Run(new SettingsForm());
is creating and displaying the form regardless of any properties I set prior
to it's call or during form creation.
Any help would be much appreciated.
Alternatively, it there is a better way to accomplish my goal please feel
free to educate me in the ways of .NET ;o)
Many thanks,
Andy.
Today is my first day at programming using .NET so please excuse if my
question seems trivial.
(All previous coding done with C++/MFC)
My aim is to create an application (consisting of a single form) which, when
started, will place an icon in the system tray and allow me to interact with
the application/main form via a context menu. No problems with this...
The problem is that when the applications starts, the main form (which
creates the tray icon etc.) is displayed. I don't want this - instead I only
want the main form to be made visible when the user selects the appropriate
item from the tray icon's context menu.
I've tried setting the form's 'Visible' property to false and also calling
it's 'Hide()' method during the form's creation but without luck. It seems
as if the line:
Application.Run(new SettingsForm());
is creating and displaying the form regardless of any properties I set prior
to it's call or during form creation.
Any help would be much appreciated.
Alternatively, it there is a better way to accomplish my goal please feel
free to educate me in the ways of .NET ;o)
Many thanks,
Andy.