<p>I'm working on a program that is form based but I have been asked to add some command line support, this works fine apart from the form flashes up and closes down when running from the command line. Is there anyway to hide the form whilst the command line is running? Some code does refer to controls so the gui would need to be accessible but not visible, is this workable?</p>

In your Main method you can create the form such as:
```
```
main = new MainForm();
```
```
then do any command line processing required.
When not in command line mode simply call:
```
```
Application.Run(main);
```
```