1.11M Members

FORM TERMINATED UNEXPECTEDLY

 
0
 

Good day folks,

I just wanna ask what event should I used to detect when a
form is closed unexpectedly.

I want to update the Log In status of a user in my database
from 'Logged In' to 'Log Out' whenever a form closes the
form unexpectedly or not.

Example, I close the form using task manager. How would I trigger
form closing event?

 
0
 

You can use FormClosing event in this scenerio, you can find it in event list.

4ca5556f55a6f028a4c63e7f46537b2e

Private Sub Form1_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
        ' Do what you want to do.
End Sub
Attachments
 
0
 

agree with Rahul47...

@Rahul47,
Can you tell mw how you add the image in the comment box,?
Please

 
1
 

4254ca2773a68a5e8a061b3e2397457f

11e2245793512a1fbde4dedfeed2bbc5

7d8e14fdb2ae6671b84cf0d0ff543e17

5) You will get something like this --> ![7d8e14fdb2ae6671b84cf0d0ff543e17](/attachments/fetch/L2ltYWdlcy9hdHRhY2htZW50cy80LzdkOGUxNGZkYjJhZTY2NzFiODRjZjBkMGZmNTQzZTE3LmpwZw%3D%3D/500 "7d8e14fdb2ae6671b84cf0d0ff543e17")

Dont worry and submit your reply.

I hope you enjoyed.

Attachments
You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: