im creating a browser app where the user logs in. I have a log out button to log them out but what if they just close the browser without logging out properly. is there a way of logging them out when they have closed the browser???
thanks
Printable View
im creating a browser app where the user logs in. I have a log out button to log them out but what if they just close the browser without logging out properly. is there a way of logging them out when they have closed the browser???
thanks
I know in VB6 it was written in the form unload event handler.
VB Code:
Private Sub OnExit(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Closing 'your code goes here End Sub
Another version thats a little more descriptive.
VB Code:
Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing End Sub
if im understanding the replies correctly all these will work when you are dealing with a standard desktop app, also when you run code on close off a form, it runs when you are nagigating between screens
I need an 'application end' type event. there is an Sub Application_End(ByVal sender As Object, ByVal e As EventArgs) but im not sure if its working properly, Should it run where i clolse IE??
any thoughts???
What version of VB are you running?
Is this ASP?
Its a browser app so it probably is a winforms app.