Starting up the win form as non visible

  • Thread starter Thread starter melon
  • Start date Start date
M

melon

So I have something like

Application.Run(new PopupForm());

public PopupForm()
{
InitializeComponent();
}

I want the PopupForm as non visible from anywhere (including the
actual form should be non visible, as well as in task bar, alt tab
bar). I tried to add this.Visible = false, or this.Hide() in the
constructor of PopupForm but none of them works.... the form still
shows up all the time. Is there anything I have done wrong?

I also tried to start it up as Minimized, but then it is still visible
in the alt tab bar.
 
If you don't want the form to be displayed until you need it, use a
console application instead and close the handle to the console to hide
it. Then, instantiate your form when you need to show it.

One question though: If you succeed in hiding the form, how do close
your application?
 
Bryan asks a good question.

Assuming that's taken care of, another possibility is setting ShowInTaskbar
to false and Opacity to 0%.
 
Back
Top