473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Any way to tell input inactivity?

Hello,

I have an application that I'd like to have logout automatically after a
certain period of inactivity. Is there any way via vb to tell how long the
keyboard and mouse have been inactive?

Thanks!
Mar 30 '06 #1
6 2561
Hi,
1) You can use in "Detail_MouseMove" this event implement any time that
the mouse move, for the keyboard you shall use KeyPress event.
2) You can use in "Form_Timer" event , this event will implement method
or process by the time that you'll determine, You shall set the
interval timer (Form.TimerInterval = TimeOut in millisecond), I think
you can set it till 1 hour, but I tried it till 10 minute and it's
worked, and if it will not work so, you can create function that count
the till you'r necessary time. *** If you need to stop this event so,
you need to set the interval to 0.
***Summary:
In "Detail_MouseMove" and "<Control>_KeyPress" event you can write:
Form.TimerInterval = <TimeOut>.
Any movement with the mouse or any key tapping the timer will update.

Hope I Helped, Haim Rubin.

Mar 30 '06 #2
Hi Haim,

I should have probably added that I don't want to write a lot of code in
each form. There has to be some sort of system variable that keeps track of
the inactivity. How are screen savers triggered?

Rick
"Haim" <Ha********@gmail.com> wrote in message
news:11*********************@e56g2000cwe.googlegro ups.com...
Hi,
1) You can use in "Detail_MouseMove" this event implement any time that
the mouse move, for the keyboard you shall use KeyPress event.
2) You can use in "Form_Timer" event , this event will implement method
or process by the time that you'll determine, You shall set the
interval timer (Form.TimerInterval = TimeOut in millisecond), I think
you can set it till 1 hour, but I tried it till 10 minute and it's
worked, and if it will not work so, you can create function that count
the till you'r necessary time. *** If you need to stop this event so,
you need to set the interval to 0.
***Summary:
In "Detail_MouseMove" and "<Control>_KeyPress" event you can write:
Form.TimerInterval = <TimeOut>.
Any movement with the mouse or any key tapping the timer will update.

Hope I Helped, Haim Rubin.

Mar 30 '06 #3
Try the following link

http://support.microsoft.com/default...b;en-us;210297

Jim

*** Sent via Developersdex http://www.developersdex.com ***
Mar 30 '06 #4
Thanks!

"Devonish" <no*****@nowhere.com> wrote in message
news:9K***************@news.uswest.net...
Try the following link

http://support.microsoft.com/default...b;en-us;210297

Jim

*** Sent via Developersdex http://www.developersdex.com ***

Mar 30 '06 #5
http://vbnet.mvps.org/code/system/getlastinputinfo.htm

"Rico" <r c o l l e n s @ h e m m i n g w a y . c o m> wrote in message
news:mtSWf.21266$%H.3552@clgrps13...
Hi Haim,

I should have probably added that I don't want to write a lot of code in
each form. There has to be some sort of system variable that keeps track of the inactivity. How are screen savers triggered?

Rick
"Haim" <Ha********@gmail.com> wrote in message
news:11*********************@e56g2000cwe.googlegro ups.com...
Hi,
1) You can use in "Detail_MouseMove" this event implement any time that
the mouse move, for the keyboard you shall use KeyPress event.
2) You can use in "Form_Timer" event , this event will implement method
or process by the time that you'll determine, You shall set the
interval timer (Form.TimerInterval = TimeOut in millisecond), I think
you can set it till 1 hour, but I tried it till 10 minute and it's
worked, and if it will not work so, you can create function that count
the till you'r necessary time. *** If you need to stop this event so,
you need to set the interval to 0.
***Summary:
In "Detail_MouseMove" and "<Control>_KeyPress" event you can write:
Form.TimerInterval = <TimeOut>.
Any movement with the mouse or any key tapping the timer will update.

Hope I Helped, Haim Rubin.


Apr 1 '06 #6
Hi Rico,

The 'Detail_Mouse_Move' event work on whole form the problem is when
you using in lot of text boxes so, if you'r , it is inefficiently to
write a double code.
If the problem was on pure VB6 so, you could resolve it by create an
array of text boxes and write the code on 'KeyPress' event which
according to all text boxes but, regretfully on access you can not
create an array of controls.

Regard, Haim Rubin.

Apr 4 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Ryan Hubbard | last post by:
I would like to limit multiple logins for a user. How and when does the session id expire? Can I set it so after x minutes of inactivity it would expire. How do I check if session id exists? If...
0
by: Serial # 19781010 | last post by:
I have a multithreaded server - one thread / client. I have a client 1 connected to thread A, and a I have client 2 connected to thread B. After certain equal period of inactivity Client 1 sends a...
0
by: Paul Winter | last post by:
I'm new to both Oracle and Discoverer. Could someone point me in the direction of where to set the inactivity timeout for Discoverer Plus? Thanks Paul
1
by: Dean J Garrett | last post by:
We have a need to determine whether a user is inactive or not, and present a pop-up to have them either logoff or renew the session. After 15 minutes of inactivity, the pop-up would ask the user to...
0
by: Jonas Hei | last post by:
I need to implement a listener that listens on a certain UDP port. I am trying to use Socket.BeginReceiveFrom for this purpose. In this scenario the remote clients (hundreds of them) send most of...
1
by: Michal Kostic via .NET 247 | last post by:
Hi I am encountering following ASP.NET problem: In the Page_Load event I initialize connection string of a sqlconnection. This works fine most of the time, but when the usercontinues using the...
4
by: Dominique Vandensteen | last post by:
I need to receive an event when a form has a certain time of inactivity. Deactivate and Activated events are not good enough. With these events I can't find out inactivity if the form is simply...
4
by: Dan | last post by:
Hi, I have a timer on a form (System.Windows.Forms.Timer - Framework 1.1) that is set to 60 seconds as sort an of inactivity monitor. If 60 seconds have elapsed without any user activity I want...
4
by: sconeek | last post by:
hi all, i am trying to implement a page re-direction after a certain amount of inactivity. can somebody please help me in this. i was thinking could i display a screensaver using JavaScript after...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.