Forums » .NET » .NET »

How to close the windows application in CSharp..?


Posted Date: 11 Feb 2008      Posted By:: venkatesan.M Profile photo    Member Level: Gold    Member Rank: 30     Points: 2   Responses: 3



Hi

I am using , C# - windows application

i have one button in my form..

If i click the button , it should close the the window.....

so wat the code for this...?

Thanks ya.......


Regards,
M.Venkatesan.

For Interview Question and Answers:
http://dotnet-interview-qa.blogspot.com

http://venkatdotnetexperiments.wordpress.com




Responses

#188539    Author: Mahesh Vishe      Member Level: Gold      Member Rank: 1445     Date: 11/Feb/2008   Rating: 2 out of 52 out of 5     Points: 2

Write
this.Close()


 
#188544    Author: Clement      Member Level: Gold      Member Rank: 0     Date: 11/Feb/2008   Rating: 2 out of 52 out of 5     Points: 2

to close a window use this.close();

to close d application use Application.Exit();


 
#188603    Author: praveenjayapal      Member Level: Gold      Member Rank: 342     Date: 11/Feb/2008   Rating: 2 out of 52 out of 5     Points: 2

hi try this..
surely it will.. there no chance to close the application directly throu c# coding.. we must have to use java script
<input type="button" value="ksjhf" onclick="javascript:window.close()" />





 
Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.



Return to Discussion Forum
Start new thread

Subscribe to Subscribers
Active Members
TodayLast 7 Daysmore...

Awards & Gifts
Talk to Webmaster Tony John

Online Members

More...
Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India