Main dialog hidden after registration dialog

  • Thread starter Thread starter Maloney
  • Start date Start date
M

Maloney

Is there a correct way or play to bring up a registration dialog at the
start of your program. I've tried 3 different ways

1) Just before Application.Run(new Form1()); and
2) In the constructor of Form1

These both show the registration dialog but after that the main
window is hidden.

3) In form_load.

It shows the registration dialog and on close shows the main dialog
correctly. But when the registration dialog is up you can still see the
main dialog by changing to it in the task list. It's read only but i don't
want to show the main dialog till after the registration dialog

Any body done this before?
 
If you stick with your 3rd way but just prior to showing the registration
dialog setting the title of the main form to an empty string. After
returning from the registration form you put the title back into the main
form. In this way the main dialog is not visible in the task list.

private void Form1_Load(object sender, System.EventArgs e)

{

string s = this.Text;

this.Text = "";

Registration r = new Registration();

r.ShowDialog();

this.Text = s;

}
 
Back
Top