|
-
Apr 10th, 2006, 06:15 AM
#1
Thread Starter
New Member
Log out users when they close browser
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
-
Apr 10th, 2006, 06:23 AM
#2
Lively Member
Re: Log out users when they close browser
I know in VB6 it was written in the form unload event handler.
-
Apr 10th, 2006, 06:43 AM
#3
Hyperactive Member
Re: Log out users when they close browser
VB Code:
Private Sub OnExit(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Closing
'your code goes here
End Sub
-
Apr 10th, 2006, 09:06 AM
#4
Re: Log out users when they close browser
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
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Apr 10th, 2006, 11:15 AM
#5
Thread Starter
New Member
Re: Log out users when they close browser
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???
-
Apr 10th, 2006, 11:18 AM
#6
Re: Log out users when they close browser
What version of VB are you running?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Apr 10th, 2006, 11:24 AM
#7
Re: Log out users when they close browser
-
Apr 10th, 2006, 11:28 AM
#8
Re: Log out users when they close browser
Its a browser app so it probably is a winforms app.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|