0

I have a winform application UI in c#. I have to now launch the .exe such that it runs in background but does not launch the UI. I have no idea as to how to do it. What changes should I make?

AP2887
  • 1

4 Answers4

2

Try this...

WindowState = FormWindowState.Minimized;

In the Main window(Main.cs) , so the app starts with minimized windows state, this can also be set in the properties windows of the main window, set value Minimized for the property WindowState also add

this.ShowInTaskbar = false;

to avoid being shown in task bar

Vishnu Babu
  • 1,183
  • 1
  • 13
  • 37
0

Your app won't work if you don't launch you form. If you want to hide the form, just use the method Form.Hide(). Besides, this page might be helpful.

DDoSolitary
  • 328
  • 2
  • 13
0

Form1 Obj = new Form1

You can use

Obj.Hide() 

or you can write in Form1 constructor

this.visible = false
andy
  • 5,979
  • 2
  • 27
  • 49
0
  • You can hide the form and still have your app running in background.

  • You can set opacity to 0 and ShowInTaskbar to false and still running your app in background.

Hemal
  • 3,682
  • 1
  • 23
  • 54