473,387 Members | 1,882 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,387 software developers and data experts.

How to detect system activity in my app?

I have a chat application. I want it to show the user as "away" if no
activity on the computer occurs for a certain amount of time.

I have a timer that I set for the correct interval, when it ticks, the chat
status changes to Away.

How can I detect any activity (mouse move, keypress, etc) on the computer
(not just in my app)?

Also, there's no Timer.Reset. So is the only way to reset the timer back to
zero by stopping and restarting the timer?
Jan 13 '06 #1
1 2147
Well in the old VB6 days i did this with a global keyboard and mouse hook
with GetAsyncKeyState and GetCursorPos API`s
so i guess you need to wrap thee two api`s in a class in VB.Net
regards

Michel Posseth [MCP]

"Terry Olsen" <to******@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...
I have a chat application. I want it to show the user as "away" if no
activity on the computer occurs for a certain amount of time.

I have a timer that I set for the correct interval, when it ticks, the
chat status changes to Away.

How can I detect any activity (mouse move, keypress, etc) on the computer
(not just in my app)?

Also, there's no Timer.Reset. So is the only way to reset the timer back
to zero by stopping and restarting the timer?

Jan 14 '06 #2

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

Similar topics

0
by: Hans Deragon | last post by:
Greetings. If I want to write a screensaver for Linux using Python, how can I detect that the user has not touched the keyboard or mouse for the last 5 mins? Sincerely, Hans Deragon --
8
by: Claudio Grondi | last post by:
It is maybe not a pure Python question, but I think it is the right newsgroup to ask for help, anyway. After connecting a drive to the system (via USB or IDE) I would like to be able to see...
2
by: dude | last post by:
How do I detect that there has been no activity on a form in an Access 97 Database Paul thanks
1
by: jdph40 | last post by:
I am using Access 2002. I downloaded the forms sample database FrmSmp97.mdb from Microsoft and used the following code in the timer event of a hidden form in order to close a database if no...
0
by: Gemma M | last post by:
Hi, I have a C# program (code fragment below), which runs forever, processing incoming jobs. Part of this program launches a COM object. However, after a while I get : ...
0
by: Luis Esteban Valencia | last post by:
Hello I have this error when I submit the page with the following code. I had never see this kind of errors. Thanks private void btnsubmit_Click(object sender, System.EventArgs e) { ...
3
by: Law | last post by:
To all the VB master, i'm new baby in VB. I would like to get ur's advice on how to stop the application when user is not in use within 5 or 10mins? Hope to hear VB master soon. Tks, Law
5
by: Ke Tao | last post by:
HI All, Is there anybody have an idea of how to detect internet is reachable ? At present , I'm using ping to detect internet is reachable , but it's maybe a bad idea , some firewall of router...
2
by: RP | last post by:
I want to detect user activity (mouse move, key click). For certain critical areas (Form in my app.), I want to check whether there is any user activity for a certain interval. If not, then I want...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.