C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » Windows »

Close One Form and Open New Form


Posted Date: 06 Nov 2009      Posted By: Abbas      Member Level: Gold     Points: 1   Responses: 4



HI Friends,
i have 2 forms, from one form button click event i want to open new form, but i want to close my current (i want to Close. Not Hide), coz if i hide, then the process runs in the background, for 1 form.

Please reply with some solutions.
Thanks and Regards
Abbas Electricwala





Responses

Author: dom    06 Nov 2009Member Level: SilverRating: 2 out of 52 out of 5     Points: 2

You can use asp:<panel> </panel>


within this tag u can create ur forms and loading event u can hide as well show by using the panel name(id)


rate if u satify



Author: Anil Kumar Pandey    06 Nov 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

use..


Form2 frm2 = new Form2();
frm2.show();
this.Close();


Thanks & Regards
Anil Kumar Pandey



Author: yugandherReddy    10 Nov 2009Member Level: BronzeRating: 2 out of 52 out of 5     Points: 2

The windows application will run in "STAThread" , always some GUI thread should run, other wise you can't show any forms.


Author: Selvam    14 Nov 2009Member Level: BronzeRating: 2 out of 52 out of 5     Points: 2

hi yar,
this s the code

In the button_click

Form u need to open

FormName InstantName=new FormName();
InstantName.Show();

tat is,

Form2 f2=new Form2();
f2.Open();////f2 is the object for the form u need to open
this.close();

For closing

this.close();



Post Reply
You must Sign In to post a response.
Next : Jump 4m one form 2 another
Previous : SQL statement not filling table for time period of "24/10/2009" to "30/10/2009"
Return to Discussion Forum
Post New Message
Category: Windows

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use