50,237 Members
3 added today
248,638 Resources
83 added today

All Devdex   All XMLdex   Current Category
XMLdex > Forums & Newsgroups > Newsgroups > microsoft.public.dotnet.xml Add this category to My Favorites

View Message Thread  (14 replies)

Results 1 - 10 of 15 Next Page »

monitor if computer is in idle Add this thread to My Favorites
From: Noel Rico Tecson
Date Posted: 5/6/2010 12:14:00 PM

Hi All,

Is there an API in VB6 that can know if your computer is idle for more
than say 30 miutes, It means to say the operator did not hit the
keyboard or move the mouse for some time.

My main purpose of this is I made a Sign In/Out from there office
computer. But many of us forget to sign out in the afternoon before
going home. So I want to add in my routine (resident program) to check
if the computer is in idle after 5:00 pm. If it's idle for more than 30
minutes then the program will signout/logout that person automatically.

Any help will be highly appreciated.

Thanks,

Noel







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

monitor if computer is in idle
From: Noel Rico Tecson
Date Posted: 5/6/2010 12:15:00 PM

Hi All,

Is there an API in VB6 that can know if your computer is idle for more
than say 30 miutes, It means to say the operator did not hit the
keyboard or move the mouse for some time.

My main purpose of this is I made a Sign In/Out from there office
computer. But many of us forget to sign out in the afternoon before
going home. So I want to add in my routine (resident program) to check
if the computer is in idle after 5:00 pm. If it's idle for more than 30
minutes then the program will signout/logout that person automatically.

Any help will be highly appreciated.

Thanks,

Noel







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

Re: monitor if computer is in idle
From: Mike Williams
Date Posted: 5/6/2010 2:29:00 PM

"Noel Rico Tecson" <noeltecson@yahoo.com> wrote in message
news:eWiD3dU7KHA.4508@TK2MSFTNGP06.phx.gbl...

> Is there an API in VB6 that can know if your computer is idle
> for more than say 30 miutes, It means to say the operator did
> not hit the keyboard or move the mouse for some time.

Well the fact that the user has not hit a key or moved the mouse for a
specified period does not actually mean that the computer is idle (it could
for example be performing an important unattended task) . . .

> My main purpose of this is I made a Sign In/Out from there
> office computer. But many of us forget to sign out in the afternoon
> before going home. So I want to add in my routine (resident
> program) to checkif the computer is in idle after 5:00 pm. If it's
> idle for more than 30 minutes then the program will signout/logout
> that person automatically.

.. . . and I'm not sure what logging that account off would do to that task?
I don't ever get involved in handling multiple users so I really don't know
what it would do, but if you are sure that in your circumstances it would do
no harm then there are probably many ways of doing it.

I'm fairly sure there will be some API function connected with the screen
saver system that could be adapted to your needs (I'm sure others here will
post some relevant stuff if there are) but as a last resort you could easily
write some VB code to insert a low level keyboard and mouse hook and get the
hook code to perform whatever action you require when the mouse and keyboard
are inactive for any specified period. That would be fairly easy to write.
And there are other alternative polling methods you could use (although I'd
go with the low level hook mysef). Probably best if you wait first though to
see if somebody posts an easier "screen saver" solution.

Mike


Re: monitor if computer is in idle
From: Mike Williams
Date Posted: 5/6/2010 2:30:00 PM

"Noel Rico Tecson" <noeltecson@yahoo.com> wrote in message
news:eWiD3dU7KHA.4508@TK2MSFTNGP06.phx.gbl...

> Is there an API in VB6 that can know if your computer is idle
> for more than say 30 miutes, It means to say the operator did
> not hit the keyboard or move the mouse for some time.

Well the fact that the user has not hit a key or moved the mouse for a
specified period does not actually mean that the computer is idle (it could
for example be performing an important unattended task) . . .

> My main purpose of this is I made a Sign In/Out from there
> office computer. But many of us forget to sign out in the afternoon
> before going home. So I want to add in my routine (resident
> program) to checkif the computer is in idle after 5:00 pm. If it's
> idle for more than 30 minutes then the program will signout/logout
> that person automatically.

.. . . and I'm not sure what logging that account off would do to that task?
I don't ever get involved in handling multiple users so I really don't know
what it would do, but if you are sure that in your circumstances it would do
no harm then there are probably many ways of doing it.

I'm fairly sure there will be some API function connected with the screen
saver system that could be adapted to your needs (I'm sure others here will
post some relevant stuff if there are) but as a last resort you could easily
write some VB code to insert a low level keyboard and mouse hook and get the
hook code to perform whatever action you require when the mouse and keyboard
are inactive for any specified period. That would be fairly easy to write.
And there are other alternative polling methods you could use (although I'd
go with the low level hook mysef). Probably best if you wait first though to
see if somebody posts an easier "screen saver" solution.

Mike


Re: monitor if computer is in idle
From: Karl E. Peterson
Date Posted: 5/6/2010 2:38:00 PM

Mike Williams wrote:
> "Noel Rico Tecson" <noeltecson@yahoo.com> wrote...
>
>> Is there an API in VB6 that can know if your computer is idle
>> for more than say 30 miutes, It means to say the operator did
>> not hit the keyboard or move the mouse for some time.
>
> Well the fact that the user has not hit a key or moved the mouse for a
> specified period does not actually mean that the computer is idle (it could
> for example be performing an important unattended task) . . .

No kidding!

>> My main purpose of this is I made a Sign In/Out from there
>> office computer. But many of us forget to sign out in the afternoon
>> before going home. So I want to add in my routine (resident
>> program) to checkif the computer is in idle after 5:00 pm. If it's
>> idle for more than 30 minutes then the program will signout/logout
>> that person automatically.
>
> . . . and I'm not sure what logging that account off would do to that task? I
> don't ever get involved in handling multiple users so I really don't know
> what it would do, but if you are sure that in your circumstances it would do
> no harm then there are probably many ways of doing it.

Activities like this are the surest possible way to bring about revolt
from the people you exist to serve. It's absolutely inexcusable, if
the users are being paid to use their brains, for this sort of nanny
intervention.

--
..NET: It's About Trust!
http://vfred.mvps.org

Re: monitor if computer is in idle
From: Karl E. Peterson
Date Posted: 5/6/2010 2:39:00 PM

Mike Williams wrote:
> "Noel Rico Tecson" <noeltecson@yahoo.com> wrote...
>
>> Is there an API in VB6 that can know if your computer is idle
>> for more than say 30 miutes, It means to say the operator did
>> not hit the keyboard or move the mouse for some time.
>
> Well the fact that the user has not hit a key or moved the mouse for a
> specified period does not actually mean that the computer is idle (it could
> for example be performing an important unattended task) . . .

No kidding!

>> My main purpose of this is I made a Sign In/Out from there
>> office computer. But many of us forget to sign out in the afternoon
>> before going home. So I want to add in my routine (resident
>> program) to checkif the computer is in idle after 5:00 pm. If it's
>> idle for more than 30 minutes then the program will signout/logout
>> that person automatically.
>
> . . . and I'm not sure what logging that account off would do to that task? I
> don't ever get involved in handling multiple users so I really don't know
> what it would do, but if you are sure that in your circumstances it would do
> no harm then there are probably many ways of doing it.

Activities like this are the surest possible way to bring about revolt
from the people you exist to serve. It's absolutely inexcusable, if
the users are being paid to use their brains, for this sort of nanny
intervention.

--
..NET: It's About Trust!
http://vfred.mvps.org

Re: monitor if computer is in idle
From: Mike Williams
Date Posted: 5/6/2010 3:38:00 PM

"Karl E. Peterson" <karl@exmvps.org> wrote in message
news:OAsPcvV7KHA.5808@TK2MSFTNGP02.phx.gbl...
> Mike Williams wrote:
>> "Noel Rico Tecson" <noeltecson@yahoo.com> wrote...
>>
>>> Is there an API in VB6 that can know if your computer is idle
>>> for more than say 30 miutes, It means to say the operator did
>>> not hit the keyboard or move the mouse for some time.
>>
>> Well the fact that the user has not hit a key or moved the mouse for a
>> specified period does not actually mean that the computer is idle (it
>> could for example be performing an important unattended task) . . .
>
> No kidding!
>

What's up, Karl? I was not the person who asked how to automatically log
accounts off after a period of keyboard and mouse inactivity, and in fact I
suggested to the OP that it might not be a sensible thing to do. Why are you
apparently shouting at me, as you seem to be doing? If you feel so strongly
about it, as you apparently do, then perhaps you should address your remarks
to the OP.

Mike


Re: monitor if computer is in idle
From: Mike Williams
Date Posted: 5/6/2010 3:40:00 PM

"Karl E. Peterson" <karl@exmvps.org> wrote in message
news:OAsPcvV7KHA.5808@TK2MSFTNGP02.phx.gbl...
> Mike Williams wrote:
>> "Noel Rico Tecson" <noeltecson@yahoo.com> wrote...
>>
>>> Is there an API in VB6 that can know if your computer is idle
>>> for more than say 30 miutes, It means to say the operator did
>>> not hit the keyboard or move the mouse for some time.
>>
>> Well the fact that the user has not hit a key or moved the mouse for a
>> specified period does not actually mean that the computer is idle (it
>> could for example be performing an important unattended task) . . .
>
> No kidding!
>

What's up, Karl? I was not the person who asked how to automatically log
accounts off after a period of keyboard and mouse inactivity, and in fact I
suggested to the OP that it might not be a sensible thing to do. Why are you
apparently shouting at me, as you seem to be doing? If you feel so strongly
about it, as you apparently do, then perhaps you should address your remarks
to the OP.

Mike


Re: monitor if computer is in idle
From: Karl E. Peterson
Date Posted: 5/6/2010 3:44:00 PM

Mike Williams wrote:
> "Karl E. Peterson" <karl@exmvps.org> wrote...
>> Mike Williams wrote:
>>> "Noel Rico Tecson" <noeltecson@yahoo.com> wrote...
>>>
>>>> Is there an API in VB6 that can know if your computer is idle
>>>> for more than say 30 miutes, It means to say the operator did
>>>> not hit the keyboard or move the mouse for some time.
>>>
>>> Well the fact that the user has not hit a key or moved the mouse for a
>>> specified period does not actually mean that the computer is idle (it
>>> could for example be performing an important unattended task) . . .
>>
>> No kidding!
>
> What's up, Karl? I was not the person who asked how to automatically log
> accounts off after a period of keyboard and mouse inactivity, and in fact I
> suggested to the OP that it might not be a sensible thing to do. Why are you
> apparently shouting at me, as you seem to be doing?

I might have been shouting, but it was *with* you, not at you. I
promise. I'm in full agreement. Sorry it came across that way! :-)

--
..NET: It's About Trust!
http://vfred.mvps.org

Re: monitor if computer is in idle
From: Karl E. Peterson
Date Posted: 5/6/2010 3:45:00 PM

Mike Williams wrote:
> "Karl E. Peterson" <karl@exmvps.org> wrote...
>> Mike Williams wrote:
>>> "Noel Rico Tecson" <noeltecson@yahoo.com> wrote...
>>>
>>>> Is there an API in VB6 that can know if your computer is idle
>>>> for more than say 30 miutes, It means to say the operator did
>>>> not hit the keyboard or move the mouse for some time.
>>>
>>> Well the fact that the user has not hit a key or moved the mouse for a
>>> specified period does not actually mean that the computer is idle (it
>>> could for example be performing an important unattended task) . . .
>>
>> No kidding!
>
> What's up, Karl? I was not the person who asked how to automatically log
> accounts off after a period of keyboard and mouse inactivity, and in fact I
> suggested to the OP that it might not be a sensible thing to do. Why are you
> apparently shouting at me, as you seem to be doing?

I might have been shouting, but it was *with* you, not at you. I
promise. I'm in full agreement. Sorry it came across that way! :-)

--
..NET: It's About Trust!
http://vfred.mvps.org

Results 1 - 10 of 15 Next Page »

 

Would you like to track this thread?

By adding this News Thread to your Favorites Area you can refer to it later with just a click of the mouse. Also you can optionally be notified instantly whenever there are any replies posted to this Thread. To add this Thread to your Favorites Area just click on the red arrow next to the subject of the thread above Add this thread to My Favorites.



ASP.NET Chart Control.
Charts from your Database.
Live Demo & FREE Trial!

ASP ArticlesThis category has been added to your weekly newsletter
ASP Web Sites
ADSI & WSH BooksThis category has been added to your weekly newsletter
FREE ComponentsThis category has been added to your weekly newsletter
ASP EventsThis category has been added to your weekly newsletter
ASP HeadlinesThis category has been added to your weekly newsletter

CSharp ArticlesThis category has been added to your weekly newsletter
C# Web SitesThis category has been added to your weekly newsletter

SQL ArticlesThis category has been added to your weekly newsletter
SQL Events
SQL HeadlinesThis category has been added to your weekly newsletter
SQL Jobs

Jobs in CaliforniaThis category has been added to your weekly newsletter

XML ArticlesThis category has been added to your weekly newsletter
XML BooksThis category has been added to your weekly newsletter
XML Web Sites
XML Tutorials

free asp host

"Alex Homer"This search has been added to your weekly newsletter

Edit My Favorites Edit Profile & Favorites

 

 

 

 

 




Developersdex Home | ASP | C# | SQL | VB | XML | Gurus
Add Your Link | Add Your Code | FAQ | Advertise | Link To Us | Contact Us |
Copyright © 2010 Developersdex™. All rights reserved.