Results 1 to 6 of 6

Thread: [RESOLVED] User Inactivity

  1. #1

    Thread Starter
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Resolved [RESOLVED] User Inactivity

    Hello,

    Can someone please provide some suggestions as to how I could achieve the following?

    Basically, on my Windows Mobile Device, I want my application to log out, after a defined period of activity, let's say 30 minutes. If during that time, the device goes into a suspended mode, then when the user wakes the mobile device up, if the period of inactivity is not greater than 30 minutes, then no re-login is required, however, if it is greater than 30 minutes, then the user should have to re-login.

    Does that make sense?

    Thanks

    Gary

  2. #2
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: User Inactivity

    Hi,
    I have a timer on my entry form, with the interval set to say 5 minutes. When the form starts, the timer starts. Whenever there is user activity, I restart the timer...
    Private Sub Restart_Idle_Timer()
    tmrIdle.Enabled = False
    tmrIdle.Enabled = True
    End Sub

    If the timer does tick, then I close the form. I would restart the timer on a button click or similar.

    As far as powering off is concerned, I don't know. Maybe you could timestamp a file every minute, and when the device wakes up (which you can detect), if the timestamp > 30 mins, then close your form.
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

  3. #3

    Thread Starter
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: User Inactivity

    Hello,

    I have found a promising answer to this question here.

    The original author of the post is in the middle of creating a working example of what he has implemented. So fingers crossed it will all work!!

    Thanks

    Gary

  4. #4

    Thread Starter
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: User Inactivity

    Hi,

    I have tested the sample application that has been provided, and so far so good. It does exactly what I want, I still need to test it on a physical windows mobile device, but from what i understand from the original author, it should work as expected.

    Thanks

    Gary

  5. #5
    New Member
    Join Date
    Sep 2008
    Posts
    1

    Re: [RESOLVED] User Inactivity

    Hi

    This sounds a lot like what I want to achieve (sort of) I just want to be able to close my application and make it start from the beginning of the program.


    I cant view that link above ^^ could you please post the actual web address so that I can have a look please.

    Thanks

  6. #6

    Thread Starter
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: [RESOLVED] User Inactivity

    Hey,

    Just tried the link above again, and it seems to work just fine, but here is the actual url:

    http://forums.microsoft.com/msdn/Sho...iteID=1&mode=1.

    Not sure if what you have described though is what the program actually does. Basically, if a user is using the application, then has a period of inactivity, then the program returns to a login screen. Then if the user is then able to log in again successfully, he or she will be returned to where they logged in. I think there is an ability to close all of the application screens if someone else logs into the device, but this isn't functionality that I have implemented.

    Thanks

    Gary

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width