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


Author: Mahesh Vishe11 Feb 2008 Member Level: Gold   Points : 2


Author: Clement11 Feb 2008 Member Level: Gold   Points : 2

to close a window use this.close();

to close d application use Application.Exit();

Author: praveenjayapal11 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()" />

Sign In to post your comments