Handling application.exit event

Please support our VB.NET advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Oct 2008
Posts: 21
Reputation: Eyo is an unknown quantity at this point 
Solved Threads: 0
Eyo Eyo is offline Offline
Newbie Poster

Handling application.exit event

 
0
  #1
Feb 21st, 2009
Hello All,

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

how could I handle the applicatoin.exit event
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 51
Reputation: martonx is an unknown quantity at this point 
Solved Threads: 8
martonx martonx is offline Offline
Junior Poster in Training

Re: Handling application.exit event

 
0
  #2
Feb 21st, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 2,641
Reputation: Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light 
Solved Threads: 245
Jx_Man's Avatar
Jx_Man Jx_Man is offline Offline
Posting Maven

Re: Handling application.exit event

 
0
  #3
Feb 21st, 2009
what event do you want?button event?click event?or what?
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3
Reputation: Praniya is an unknown quantity at this point 
Solved Threads: 1
Praniya Praniya is offline Offline
Newbie Poster

Re: Handling application.exit event

 
0
  #4
Feb 26th, 2009
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
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC