You must Sign In to post a response.

How to close the windows application in CSharp..?


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.......


#188539    Author: Mahesh Vishe    11 Feb 2008 Member Level: Gold   Points : 2


#188544    Author: Clement    11 Feb 2008 Member Level: Gold   Points : 2

to close a window use this.close();

to close d application use Application.Exit();

#188603    Author: praveenjayapal    11 Feb 2008 Member Level: Gold   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()" />

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.