关闭或关闭计算机

编程入门 行业动态 更新时间:2024-10-25 08:17:29
本文介绍了关闭或关闭计算机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家好,我有一个问题在于我无法解决的问题,所以我问你们这里有人可以帮助我。我的问题是,在vb 2010中是否有可能在计算机自​​动关闭或意外关闭时跟踪或跟踪计算机?因为我的登录表单中有一个代码,当用户登录主表单时,其他用户无法登录到该表单。我已经在我的表上设置了一些条件到这个表单。它工作得很好然后,它我突然意识到如果计算机意外关闭或者某人重新启动并且我的桌子上的情况仍然是真的那么该怎么办呢。然后用户再也无法登录,因为它是真的。 有没有办法解决我的问题或替代方法? 谢谢大家!

hi there everyone, i have a question on my mind that i can't solved by my own so i'm asking anyone of you here guys can help me. my question is this, is it possible in vb 2010 to trace or track the computer when it automatically shutdown or it accidentally shutdown by itself? because i have a code in my login form which is when the user log into the main form,other users can't log to that form.i've set some condition on my table to this form.it works perfectly but then,it came up to my mind that what if the computer turned off by itself accidentally or it restarted by someone and the condition on my table is still true.then the users cant login anymore because its true. is there a way for my question or an alternative way for my code? thanks guys!

推荐答案

用户会话(因为那是你实际跟踪的内容)应该在一段时间后超时。因此,最好通过LastActivityDate定期更新会话来保持会话处于活动状态。这样,会话可以在一小时没有活动后到期,并且用户可以在该时段之后再次登录。 User sessions (because that's what you're actually tracking) should timeout after a certain period. So it's best to keep the session active by updating it regularly with a LastActivityDate. That way, a session could expire after one hour of no activity, and the user can login again after that period.

更多推荐

关闭或关闭计算机

本文发布于:2023-11-02 13:47:20,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1552560.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:关闭计算机

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!