Subscribe to Subscribers

Forums » .NET » .NET »

How to close the windows application in CSharp..?


Posted Date: 11 Feb 2008      Posted By:: venkatesan.M     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
Dot Net Code Snippets




Responses

#188539    Author: Mahesh Vishe      Member Level: Gold      Member Rank: 1402     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.



Next : Find the number of occurences in a string..
Previous : Resource Files: How to use the resource files, how to know which language to use?
Return to Discussion Forum
Post New Message
Category:

Related Messages

Active Members
TodayLast 7 Daysmore...

Awards & Gifts
Talk to Webmaster Tony John
Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
2005 - 2013 All Rights Reserved.
.NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
Articles, tutorials and all other content offered here is for educational purpose only.
We are not associated with Microsoft or its partners.