Auto Logout or Lock the application.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • venkatanarasimhaa
    New Member
    • Dec 2007
    • 20

    #1

    Auto Logout or Lock the application.

    Hi,

    I would like to put an option in my VB 6.0 application. Once if we dont use my application for 3mins(or some time), it should logout or lock, so that the user have to enter password to re-enter into the application.

    Please help me out on this.
    Many Thanks in advance.

    Have a nice weekend.


    Regards,
    Venkat.
  • jamesd0142
    Contributor
    • Sep 2007
    • 471

    #2
    i did this by creating a global variable "Timer"

    i added a timer to my app with intervals every 30 seconds, and used the code on my timer:

    Timer += 1 '1 = 30 seconds

    If Timer >= "60" Then
    'Me.Hide()
    Me.Enabled = False
    Login.Show()
    Timer1.Enabled = False
    Login.Timer1.En abled = True
    End If

    now u need to rset the timer variable to 0 everytime u app does something, so on each button, event of any kind add:

    timer = "0"

    also on your login form u need to set the timer to enabled when some1 successfully logs in.

    seems to work perfect for me.

    NOTE: this is vb2005 code

    Comment

    • dekker
      New Member
      • Mar 2008
      • 1

      #3
      Me.Hide
      Me.Enabed = False
      Locker.Show

      Comment

      Working...