Click here to Skip to main content
15,894,410 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all
i want to show form2(my main form) in form1(my login form) button click
i used this :


C#
form2 f2=new form2();
this.hide();
f2.show();


this work but when i close form2 , application Still Running (Form1 is not close).

i want close form1 when form2 show . and application close when form2 it close .

please help me
Posted

good clarification[^] by SA
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 25-Aug-11 23:35pm    
SA confirms: applicable advice, voted 5.
--SA
koolprasad2003 26-Aug-11 0:14am    
Thanks
Try this:

Form2 form = new Form2();
            form.Show();
            this.Close();


Hope this helps
 
Share this answer
 
Asked and answered. Learn how to use the search functionality on the site.

Enabling and disablling of a form[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900