Form.Hide() or Form.Visable won't work. :(

  • Thread starter Thread starter akowald
  • Start date Start date
A

akowald

For some reason Form1.hide() won't hide the form. I run this command at
form load. I need it to hide because I'm placing an icon on the system
tray. Any ideals? I probley changed something that messed it up.

Thanks for reading,

AK
 
*sigh*


namespace teklinks
{
public partial class Form1 : Form
{
public Form1()
{
this.Hide();
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
this.Hide();
}
}
}

:P
 
*sigh*


namespace teklinks
{
public partial class Form1 : Form
{
public Form1()
{
this.Hide();
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
this.Hide();
}
}
}

Hiding the form inside the form's load event will not work.

If you don't want the form to be visible, then don't call it's Show or
ShowDialog method. Instead, put your icon in the system tray inside of
your main method. Then call Application.Run without any arguments.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top