Hi,
I have a little issue that I need some light shed on please.
I have 2 forms; StartUp and MainForm.
When the application starts with the StartUp form the forms load section check to see if a file exists, if it does, it closes and opens the MainForm using the code below:-
MainForm form = new MainForm();
form.ShowDialog();
this.Close();
That all works brilliantly and if the file does exist the application runs straight to the MainForm without showing the StartUp form at all.
However, I have been trying to implement this same piece of code onto a button click event on my StartUp form and this is where it breaks down.
Upon clicking the button, the MainForm loads fine but the StartUp form is still displayed albeit behind the MainForm.
What would be causing this to happen?
How can I rectify it so the StartUp form does actually close on this button click?
Kind regards..,
MT ;)