943,752 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Marked Solved
  • Views: 7648
  • VB.NET RSS
Feb 21st, 2009
0

Handling application.exit event

Expand Post »
Hello All,

I need to trigger an event on application.exit on windows application (vb.net)....

how could I handle the applicatoin.exit event
Similar Threads
Eyo
Reputation Points: 10
Solved Threads: 1
Newbie Poster
Eyo is offline Offline
22 posts
since Oct 2008
Feb 21st, 2009
0

Re: Handling application.exit event

I suggest you should handle the Form.Close event, or if you have a quit button on your form, you should handle that button's click event.
Reputation Points: 10
Solved Threads: 8
Junior Poster in Training
martonx is offline Offline
51 posts
since May 2008
Feb 21st, 2009
0

Re: Handling application.exit event

what event do you want?button event?click event?or what?
Reputation Points: 1182
Solved Threads: 392
Posting Sensei
Jx_Man is offline Offline
3,138 posts
since Nov 2007
Feb 26th, 2009
0

Re: Handling application.exit event

for example : you have to handle form closing event


Dim ask As String

Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
ask = MessageBox.Show("Are You Sure Want To Quit?", "form1", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If ask = MsgBoxResult.No Then
e.Cancel = True
Exit Sub
Else
Application.Exit()
End If
End Sub
Reputation Points: 10
Solved Threads: 1
Newbie Poster
Praniya is offline Offline
3 posts
since Feb 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: Basketball Simulator
Next Thread in VB.NET Forum Timeline: Microsoft Agent Control in VB.Net





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC