473,405 Members | 2,379 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,405 software developers and data experts.

Inactive application

Hello,

How to find for how long an application is not active, e.g. Outlook or some
other application. To add to the problem, how to find from inside of my
application for how long it was in-active. I do not want to use Timer. Is
there a way in windows or an API for that?

Thanks,
Pohihihi
Nov 16 '05 #1
4 1594
What does an "inactive application" mean? Outlook polls for new mail even when the user is not directly interacting with it

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<Om*************@TK2MSFTNGP14.phx.gbl>

Hello,

How to find for how long an application is not active, e.g. Outlook or some
other application. To add to the problem, how to find from inside of my
application for how long it was in-active. I do not want to use Timer. Is
there a way in windows or an API for that?

Thanks,
Pohihihi
Nov 16 '05 #2
I guess what I mean was no activity by the user on the application (e.g. he
is not using computer for sometime).
"Richard Blewett [DevelopMentor]" <ri******@NOSPAMdevelop.com> wrote in
message news:eX**************@tk2msftngp13.phx.gbl...
What does an "inactive application" mean? Outlook polls for new mail even
when the user is not directly interacting with it

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk
nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<Om*************@TK2MSFTNGP14.phx.gbl>

Hello,

How to find for how long an application is not active, e.g. Outlook or
some
other application. To add to the problem, how to find from inside of my
application for how long it was in-active. I do not want to use Timer. Is
there a way in windows or an API for that?

Thanks,
Pohihihi

Nov 16 '05 #3
Hi,

I'm not sure if one can get this piece of info for a particular application,
but if it goes for the whole system there is an API for that. Look at
GetLastInputInfo. I think it is has no managed version or at least I don't
know of any.
--
HTH
Stoitcho Goutsev (100) [C# MVP]
"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote
in message news:%2****************@tk2msftngp13.phx.gbl...
Hi,

From what I remember from a Jeffrey Richter's book on Windows, the system
tracks UI messages sent to an application, and if there was no mouse and
keyboard messages for some time, the application priority could be lowered
in favour of foreground applications. So, a timer, in one way or another,
is required. I am not sure whether a ready-made API call exists telling
you how long an application has not been receiving user input, but you can
implement this yourself by keeping track of the user input messages.

I also think IM applications (ICQ, MSN Messenger etc.) use a similar
approach for automatically setting your status as "Away".

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

"Pohihihi" <pohihihi@ho> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
I guess what I mean was no activity by the user on the application (e.g.
he is not using computer for sometime).
"Richard Blewett [DevelopMentor]" <ri******@NOSPAMdevelop.com> wrote in
message news:eX**************@tk2msftngp13.phx.gbl...
What does an "inactive application" mean? Outlook polls for new mail
even when the user is not directly interacting with it

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk
nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<Om*************@TK2MSFTNGP14.phx.gbl>

Hello,

How to find for how long an application is not active, e.g. Outlook or
some
other application. To add to the problem, how to find from inside of my
application for how long it was in-active. I do not want to use Timer.
Is
there a way in windows or an API for that?

Thanks,
Pohihihi


Nov 16 '05 #4
thanks everyone.
"Pohihihi" <pohihihi@ho> wrote in message
news:Om*************@TK2MSFTNGP14.phx.gbl...
Hello,

How to find for how long an application is not active, e.g. Outlook or
some other application. To add to the problem, how to find from inside of
my application for how long it was in-active. I do not want to use Timer.
Is there a way in windows or an API for that?

Thanks,
Pohihihi

Nov 16 '05 #5

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

Similar topics

6
by: Bart Nessux | last post by:
Hello, Auditors want us to log out a user if the computer they are logged onto has been unused/inactive for a set period of time. It's trivial to logout the user, but we're having trouble...
8
by: salad | last post by:
I was wondering how you handle active/inactive elements in a combo box. Let's say you have a combo box to select an employee. Joe Blow has been selected for many record however Joe has left the...
1
by: Mike | last post by:
I' d like to list all inactive clients. Inactive client is a client who hasn't had invoice for 2 months. I use INNER JOIN to join invoice view (vwDok4FSFZGrid) and clients addresses table...
5
by: kimiraikkonen | last post by:
Hi, I was working on a screen capturing application which must do its work when a key (eg: CTRL) is pressed while the application is resides in tray as a notification icon. I mean, while my...
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?
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
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,...
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,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.