exiting program

This is a discussion on exiting program within the C# Programming forums, part of the General Programming Boards category; i use Me.Close(); to terminate the program but it does not work, this will be caled when the close button ...

  1. #1
    Registered User
    Join Date
    Mar 2002
    Posts
    17

    Question exiting program

    i use Me.Close(); to terminate the program but it does not work, this will be caled when the close button is pressed, but the form diapers, but the program is still running in the task manager and i have to use the ide to stop it,

    what is the proper way to close the app, or how can i fix this??

  2. #2
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,139
    >Me.Close();

    This is VB code. Anyway, if you set your button as a dialogresult in the form editor, the closing behaviour should be automatically added.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  3. #3
    Something Clever ginoitalo's Avatar
    Join Date
    Dec 2001
    Posts
    187
    In C#, if your program consists of 1 form and you code myFormName.Close() the program will terminate entirely.

  4. #4
    Registered User CompiledMonkey's Avatar
    Join Date
    Feb 2002
    Location
    Richmond, VA
    Posts
    438
    To close the entire application, you need to use "Application.Exit();". This is for a Windows Form application.

  5. #5
    . Driveway's Avatar
    Join Date
    May 2002
    Posts
    469
    Easy enough.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. exiting program
    By ypramesh in forum C Programming
    Replies: 2
    Last Post: 04-01-2006, 02:27 PM
  2. Need help with my program...
    By Noah in forum C Programming
    Replies: 2
    Last Post: 03-11-2006, 06:49 PM
  3. Program exiting
    By sql.scripter in forum C Programming
    Replies: 9
    Last Post: 01-28-2006, 07:51 PM
  4. Exiting a program
    By osal in forum Windows Programming
    Replies: 2
    Last Post: 07-14-2004, 08:51 PM
  5. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 10:04 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21