VB6 Appl IDLE for sometime

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mohan Krishna
    New Member
    • Oct 2007
    • 115

    VB6 Appl IDLE for sometime

    Hi Everyone!

    I am developing a project in VB6 and Access as backend.

    I need an idea from you that if the application is idle for some time then it should ask the LOGIN Password.
    Just get an idea of Screensaver in Windows.

    Thank You !
    Last edited by Killer42; Nov 23 '07, 01:51 AM.
  • CyberSoftHari
    Recognized Expert Contributor
    • Sep 2007
    • 488

    #2
    You can use a timer control, Idle Flag, MouseMove and KeyPress events.
    Set the time interval of timer and validate the idle flag there and update flag to True.
    Update the [CODE=vb]Idleflag = False[/CODE] in MouseMove and KeyPress events.
    Last edited by Killer42; Nov 23 '07, 01:43 AM.

    Comment

    • Mohan Krishna
      New Member
      • Oct 2007
      • 115

      #3
      Originally posted by CyberSoftHari
      You can use a timer control, Idle Flag, MouseMove and Keypress events.
      Set ...
      Thank you for responding.

      Where shall I keep those events - whether in Main Form or else?
      Shall I take a separate Timer Control for that?

      Thank you once again!
      Last edited by Killer42; Nov 23 '07, 01:41 AM.

      Comment

      • CyberSoftHari
        Recognized Expert Contributor
        • Sep 2007
        • 488

        #4
        Let me clear one thing.
        You want application idle or system idle?
        If app idle, you have to use the timer control in main form and all other events in all forms.
        Last edited by Killer42; Nov 23 '07, 01:41 AM.

        Comment

        • lotus18
          Contributor
          • Nov 2007
          • 865

          #5
          Hi Mohan Krishna

          What a great idea. Maybe I can apply this with some of my projects.

          Good Luck : )

          Comment

          • Mohan Krishna
            New Member
            • Oct 2007
            • 115

            #6
            Originally posted by lotus18
            Hi Mohan Krishna

            What a great idea. Maybe I can apply this with some of my projects.

            Good Luck : )
            Thank You Hari !

            Thank You Lotus18 !

            Lotus18, Please give me an idea about the code when you do. And, I do the same!

            ThanQ

            Comment

            • lotus18
              Contributor
              • Nov 2007
              • 865

              #7
              Originally posted by Mohan Krishna
              Thank You Hari !

              Thank You Lotus18 !

              Lotus18, Please give me an idea about the code when you do. And, I do the same!

              ThanQ
              OK. Let's just share our knowledge. : )

              ALL THE BEST MOHAN!!!

              Comment

              • Killer42
                Recognized Expert Expert
                • Oct 2006
                • 8429

                #8
                I don't think it will be as simple as setting a flag. Because the flag might have been cleared a tenth of a second before the timer fired. I think you would need to track the actual time that the last activity occured. Then in your timer you can test how long it has been.

                Comment

                • CyberSoftHari
                  Recognized Expert Contributor
                  • Sep 2007
                  • 488

                  #9
                  For App Idle
                  ------------------
                  1.Set the time interval to your limit of popup the Login screen.
                  2.Make all form key preview = true.
                  3.Make Public bolIdleFlag = false in modules.
                  4.As well in all keypress and mouse move events and enable the timer control.
                  5.In timer_timer() event write code to popup the login screen.
                  This is the point I try to describe and there may be some better solutions.
                  Last edited by Killer42; Nov 24 '07, 01:42 AM.

                  Comment

                  • Killer42
                    Recognized Expert Expert
                    • Oct 2006
                    • 8429

                    #10
                    Can we just get something straight, here? I've been correcting a number of these posts, but the word is not "ideal". It is "idle". There's a difference.

                    Comment

                    • CyberSoftHari
                      Recognized Expert Contributor
                      • Sep 2007
                      • 488

                      #11
                      Sorry, it’s "Idle". Ok, will the above points are useful?

                      Comment

                      Working...