Prev: New usenet hierarchy proposal
Next: Changing Form's BorderStyle property at run time but before form is loaded
From: Noel Rico Tecson on 6 May 2010 14:10 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 ***
From: Mike Williams on 6 May 2010 16:25 "Noel Rico Tecson" <noeltecson(a)yahoo.com> wrote in message news:eWiD3dU7KHA.4508(a)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
From: Karl E. Peterson on 6 May 2010 16:36 Mike Williams wrote: > "Noel Rico Tecson" <noeltecson(a)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
From: Mike Williams on 6 May 2010 17:36 "Karl E. Peterson" <karl(a)exmvps.org> wrote in message news:OAsPcvV7KHA.5808(a)TK2MSFTNGP02.phx.gbl... > Mike Williams wrote: >> "Noel Rico Tecson" <noeltecson(a)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
From: Karl E. Peterson on 6 May 2010 17:42 Mike Williams wrote: > "Karl E. Peterson" <karl(a)exmvps.org> wrote... >> Mike Williams wrote: >>> "Noel Rico Tecson" <noeltecson(a)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
|
Next
|
Last
Pages: 1 2 Prev: New usenet hierarchy proposal Next: Changing Form's BorderStyle property at run time but before form is loaded |