You must Sign In to post a response.
  • Category: .NET

    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

  • #188544
    to close a window use this.close();

    to close d application use Application.Exit();

  • #188603
    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.