473,546 Members | 2,196 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2165
Well in the old VB6 days i did this with a global keyboard and mouse hook
with GetAsyncKeyStat e 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******@hotma il.com> wrote in message
news:%2******** *******@TK2MSFT NGP15.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
2478
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
2122
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 within seconds if there were changes in the file system of that drive since last check (250 GB drive with about four million files on it). How to...
2
1884
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
5821
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 activity was detected. I have it set for one minute for testing purposes only. However, my problem with this code is when the message box pops up and...
0
1518
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 : System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x80010007):...
0
4869
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) { string requestLocation = "http://estacion15/HTTPSender/BTSHTTPReceive.dll";
3
1394
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
2696
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 may block ping requesting. Best Regards, Ke Tao
2
7237
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 to log off the Form. I don't want to user Timer controls. Is there any build in .NET class that can do this and return user-activity.
0
7507
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7435
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7698
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7947
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7461
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6030
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5080
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3472
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1046
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.