【发布时间】:2014-02-28 05:24:33
【问题描述】:
我正在做一个 vb.net 应用程序,其中用户需要登录到系统。如果系统崩溃或停止我将如何更改他们的登录状态以注销?我将如何自动注销系统中的用户?在此先感谢您的回答对我有很大帮助。
【问题讨论】:
标签: vb.net
我正在做一个 vb.net 应用程序,其中用户需要登录到系统。如果系统崩溃或停止我将如何更改他们的登录状态以注销?我将如何自动注销系统中的用户?在此先感谢您的回答对我有很大帮助。
【问题讨论】:
标签: vb.net
除非您发现错误并执行某些操作或在遇到错误时重新路由代码执行方向,否则您无法执行此操作。你可以这样做......
Try
'Whatever regular code
Catch ex as Exception
'Upon encountering error do the logout code here
Finally
'This part executes whether your app encounters error or not, so if you just want to logout when your app meets the error, you can leave this blank.
End Try
如果错误是与数据库的连接,这将不起作用。
【讨论】: