Results 1 to 6 of 6

Thread: should I user CLICK event or MOUSE MOVE ?? [RESOLVED]

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2004
    Posts
    252

    should I user CLICK event or MOUSE MOVE ?? [RESOLVED]

    Hi friends,
    I am back to my trusted rescue team.

    I am working on windows vb.net application.
    I need to add feature called USER IDLE TIME.
    If user is not doing any activity for certain seconds [lets say 60 seconds] then, user have to activate again.

    I created TIMER Object and set interval time = 60 seconds.
    here is the code...
    ================================================
    Public intUserIdleTime as integer = 60
    Public intUserActive as integer

    Private Sub timerTimeBACK_Elapsed(ByVal sender As System.Object, ByVal e As System.Timers.ElapsedEventArgs) Handles timerTimeBACK.Elapsed
    intUserActive += 1
    If intUserActive = intUseIdleTime Then
    boolUserACTIVE = False : cmdChangeUserBACK_Click(sender, e)
    End If
    End Sub
    ========================================
    Up to my knowledge, there are 2 ways to determine USER IDLE / ACTIVE situation.

    1] on click event of every components of every form, I write intUserActive=0

    OR

    2] ON MOUSE MOVE event of of every components of every form, I write intUserActive=0

    -if I use mouse move event then I suspect, it would slow down performance.

    which one is better Performance point of view?

    thank you,

    -nanc
    Last edited by NANC; Apr 24th, 2006 at 06:00 PM.

  2. #2
    Frenzied Member the182guy's Avatar
    Join Date
    Nov 2005
    Location
    Cheshire, UK
    Posts
    1,473

    Re: should I user CLICK event or MOUSE MOVE ??

    i would use Click because mousemove would be highly inefficient
    Chris

  3. #3
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,383

    Re: should I user CLICK event or MOUSE MOVE ??

    do you want to do this if they are idle just in your app, or idle on the PC in general?

    I believe there is an API function built into windows that you can get PC idle time from..

    a good example of this would be what the system uses to know when to turn a screen saver on...

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Jan 2004
    Posts
    252

    Re: should I user CLICK event or MOUSE MOVE ??

    I want to make SYSTEM IDLE TIME for my windows application only [not for whole pc]

    thanks,

    -nanc

  5. #5
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    105,461

    Re: should I user CLICK event or MOUSE MOVE ??

    Quote Originally Posted by NANC
    I want to make SYSTEM IDLE TIME for my windows application only [not for whole pc]

    thanks,

    -nanc
    Then using mouse movements would be illogical. Moving the cursor over your app is hardly using it.

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Jan 2004
    Posts
    252

    Re: should I user CLICK event or MOUSE MOVE ?? [RESOLVED]

    I got it,

    thank you for your kind help...

    -nanc

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