Windows Application in C#

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi,
I am a newbie in C# (windows apps). I want to create an application that:
- when you launch the exe file the first form will appear (on the form there
is a button)
- when you click the button a new form appears (login form to sql db) with
'logon' button //up to here I can do that
- on that form you specify server name, user, etc
- when you click 'logon' these 2 forms should disappear and a new finall
form should appear.

the problem is how to do that? I want (after logging on) these to forms to
disappear and a new form to appear and when you close the 3rd form, the whole
applicaton should close.
I mean, closing the 3rd form should make 1st form close.
1st form is the parent
 
Chris,


What is the function of the first form, why not just this.

Open a windowsform project and create an extra form using add items
Drag on that form (2) a button and click on that, and set in the showed
click event this code

\\\
Close();
///
Now click on the Form1 and set than in the load event that appears this code
\\\
Form2 frm = new Form2();
frm.ShowDialog();
frm.Dispose();
///

You can use that form1 for more than to have that extra screen a little bit
crazy behaviour but if you want it you can use this endless deep.

I hope this helps,

Cor
 
Back
Top