Hiding standalone Windows application on start up?  
Author Message
Andrew Mercer





PostPosted: Visual C# General, Hiding standalone Windows application on start up? Top

Hi,

I have an application that runs locally on client machines which I want to start up automatically and then hide (ie add an icon to the task bar and allow to run in the background). However it does not do as I would like.

I can:

1. Automatically start the application.

2. Add the icon to the task bar

3. Allow the user to click a button in the application which hides the application (ie removes it from the screen)

4. Allow the user to double click the icon and make the application become visible again, or be made invisible when visible.

5. Enable actions to be done by the application whilst it is invisible.

6. Allow the application to made visible and invisible automatically as a result of actions in (5) above.

However what ever I try on initial load the application always stays visible until I do one of the actions above.

What am I doing wrong

I have tried this.Hide() and/or this.SendToBack() without success.

Any help greatly appreciated.

Thanks Andrew




Visual C#7  
 
 
Markku Behm





PostPosted: Visual C# General, Hiding standalone Windows application on start up? Top

Hi

Change your main form WindowState property to Minimized.

Yours Markku