logout when idle

Posted on 2006-04-23
Last Modified: 2011-09-20
Dear All,
I would like my program execute the exit command when the form is idle for 5 minutes.
Can anyone tell me how to do it please? Thank you.
Question by:chausuenwang
    LVL 14

    Accepted Solution

    You might try the following:

    Create a timer: timQuit.
    It will be reset on any windows event..
    if nothing comes in the timer will expire and close your app

      Protected Overrides Sub DefWndProc(ByRef m As System.Windows.Forms.Message)

        End Sub

     Private Sub timQuit_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles timQuit.Tick
        End Sub

    Author Comment

    thax mate

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Article by: jpaulino
    XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String ( Literal, only instead of starting and ending with w…
    Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now