Thread: closing a Windows Application with a On_click Event?

  1. #1
    Registered User
    Join Date
    Aug 2005
    Posts
    16

    closing a Windows Application with a On_click Event?

    Is this possible? i have not found any code anywhere to do this. i have a button in the program with Button1.Text="Close", but.... i cant figure out how to actually close the form haha. please help

  2. #2
    Registered User
    Join Date
    May 2005
    Posts
    4
    Do you want to end the application completely or just close the current form? If you want to close the current form then you can use this:

    Code:
    this.close();

  3. #3
    Registered User
    Join Date
    Aug 2005
    Posts
    6
    And if you want to completely close the application then the following does the job:

    Code:
    Application.Exit();

  4. #4
    Registered User
    Join Date
    Aug 2005
    Posts
    16
    Thank you!!!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Inserting a swf file in a windows application
    By face_master in forum Windows Programming
    Replies: 12
    Last Post: 05-03-2009, 11:29 AM
  2. .NET Windows Application Question
    By obaid in forum Windows Programming
    Replies: 2
    Last Post: 04-17-2008, 06:33 AM
  3. (Gnome) X Windows Application Issue
    By stickdeoderant in forum Linux Programming
    Replies: 0
    Last Post: 05-21-2007, 10:41 AM
  4. Dialog Box Problems
    By Morgul in forum Windows Programming
    Replies: 21
    Last Post: 05-31-2005, 05:48 PM
  5. MFC dialog application - how to update two windows
    By Unregistered in forum Windows Programming
    Replies: 1
    Last Post: 10-23-2001, 01:54 AM