PC Review


Reply
Thread Tools Rate Thread

How can I tell if the system is 'idle', or the screen saver is running, or the machine is locked?

 
 
Kevin Buchan
Guest
Posts: n/a
 
      25th Feb 2004
How can I tell if the system is 'idle', or the screen saver is
running, or the machine is locked?
I am writing an application that could really benefit from knowing
this information. During 'idle' time, I could do some of the slightly
heavier processing; during the 'working' time, I would display the
non-intrusive notifications that I don't want my customer to miss.

I see that I can apparently set the thread priority of my background
process to 'ProcessPriorityClass.Idle' and it should only kick off
when the system is idle, but I'm not certain if this is the 'best'
way... it sounds good, though.

Just some URLs or mention of some API's would be sufficient.

Thanks.


-Kevin Buchan
(E-Mail Removed)
 
Reply With Quote
 
 
 
 
=?Utf-8?B?RXJpYyBGbGVldA==?=
Guest
Posts: n/a
 
      25th Feb 2004
I would strongly recommend going with setting the priority of the thread. Why try to reinvent the wheel, when Microsoft has already done the dirty work for you?

Eric
 
Reply With Quote
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      25th Feb 2004
* Kevin Buchan <(E-Mail Removed)> scripsit:
> How can I tell if the system is 'idle', or the screen saver is
> running, or the machine is locked?


Screen saver:

<http://www.mvps.org/dotnet/dotnet/samples/operatingsystem/downloads/ScreensaverStart.zip>

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet/>
 
Reply With Quote
 
Kevin Buchan
Guest
Posts: n/a
 
      25th Feb 2004
Thanks to you both for such fast responses.


-Kevin Buchan
(E-Mail Removed)


On 25 Feb 2004 17:29:20 +0100, hirf-spam-me-(E-Mail Removed) (Herfried K.
Wagner [MVP]) wrote:

>* Kevin Buchan <(E-Mail Removed)> scripsit:
>> How can I tell if the system is 'idle', or the screen saver is
>> running, or the machine is locked?

>
>Screen saver:
>
><http://www.mvps.org/dotnet/dotnet/samples/operatingsystem/downloads/ScreensaverStart.zip>


 
Reply With Quote
 
Kevin Buchan
Guest
Posts: n/a
 
      25th Feb 2004
(Followup message)

I cannot read the language that the comments were written in, but the
code is completely clear.

Thank you very much for this sample.


-Kevin Buchan
(E-Mail Removed)


On 25 Feb 2004 17:29:20 +0100, hirf-spam-me-(E-Mail Removed) (Herfried K.
Wagner [MVP]) wrote:

>* Kevin Buchan <(E-Mail Removed)> scripsit:
>> How can I tell if the system is 'idle', or the screen saver is
>> running, or the machine is locked?

>
>Screen saver:
>
><http://www.mvps.org/dotnet/dotnet/samples/operatingsystem/downloads/ScreensaverStart.zip>


 
Reply With Quote
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      25th Feb 2004
* Kevin Buchan <(E-Mail Removed)> scripsit:
> I cannot read the language that the comments were written in, but the
> code is completely clear.


VB.NET is the language everybody here is speaking.

:-)

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet/>
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Screen Saver is locked Dr. Palpatine Microsoft Windows 2000 Registry 10 15th Jan 2008 04:20 AM
screen saver for auto log off after a certain period of idle time Shenan Stanley Windows XP Security 7 9th Mar 2005 06:09 PM
Station Locked Screen Saver ? Retro Bob Microsoft Windows 2000 0 24th Sep 2004 04:22 PM
detect idle and screen saver =?Utf-8?B?aG5xNTE4MzQ=?= Microsoft Access Form Coding 0 3rd Feb 2004 11:01 PM
Screen Saver Does Not Stay Locked AJ Windows XP General 0 24th Aug 2003 06:31 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:10 AM.