Results 1 to 4 of 4

Thread: Application closes with the close of Form

  1. #1
    Join Date
    Jan 2009
    Posts
    96

    sad Application closes with the close of Form

    Hi,

    I have developed an application in ASP.net,when i sees the code in the source it shows perfectly alright.It gives error when i run an application i work for while when i close that form to make some changes in the source code, the whole application gets closed,without displaying any kind of error, i don't understand what is going on..

    If anybody has any direction please let me know.

    Thank you for any help you can give me.

  2. #2
    Join Date
    Oct 2008
    Posts
    167

    Re: Application closes with the close of Form

    Maybe it has the "end" code on form terminate or edit the properties that shutsdown the program when the last form closes.

  3. #3
    Join Date
    Dec 2008
    Posts
    202

    Re: Application closes with the close of Form

    I believe in C# that an application automatically closes when the last form is closed. If however you wish the application to exit when a specific form is closed you could add Application.Exit to one of the close events for that form.

  4. #4
    Join Date
    Mar 2008
    Posts
    232

    Re: Application closes with the close of Form

    The Closing event occurs as the form is being closed. When a form is closed, all resources created within the object are released and the form is disposed. If you cancel this event, the form remains opened. To cancel the closure of a form, set the Cancel property of the CancelEventArgs passed to your event handler to true.

    When a form is displayed as a modal dialog box, clicking the Close button (the button with an X at the upper-right corner of the form) causes the form to be hidden and the DialogResult property to be set to DialogResult.Cancel. You can override the value assigned to the DialogResult property when the user clicks the Close button by setting the DialogResult property in an event handler for the Closing event of the form.

    Here you may get some example and the code for your Application,even you can check your code with this.

Similar Threads

  1. Replies: 3
    Last Post: 22-06-2011, 10:38 AM
  2. Live Mesh application closes down in HTC Touch Diamond
    By Apiatan in forum Portable Devices
    Replies: 5
    Last Post: 10-08-2010, 01:56 AM
  3. Police Chase game application closes down
    By Orion lella in forum Video Games
    Replies: 5
    Last Post: 23-03-2010, 06:50 AM
  4. How to close application in VB
    By Mindstorm in forum Software Development
    Replies: 6
    Last Post: 29-10-2009, 10:08 AM
  5. Replies: 3
    Last Post: 19-08-2009, 08:59 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,112,567.21563 seconds with 16 queries