|
-
Feb 7th, 2000, 06:06 PM
#1
Thread Starter
New Member
I have a program that is used to test a product. It has it's own screensaver built in so I can easily update the screensaver's message if a warning arises to alert the operator. I have it set up to start the screensaver after 60 sec of inactivity. I can monitor the mouse anywhere on the screen, but I can not tell if a user is typing outside of my app. So the screensaver tends to kick in if you are, say, typing a long e-mail and don't touch the mouse. I found some code that looks for specific "Hot-keys", but I ned something that fires for any key press, to reset my counter.
Anyone have any ideas???
Thanks!
Glenn
-
Feb 7th, 2000, 07:24 PM
#2
PowerPoster
There's an API function GetKeyState or something... try this
------------------
[email protected]
...
Every program can be reduced to one instruction which doesn't work.
-
Feb 7th, 2000, 08:22 PM
#3
-
Feb 7th, 2000, 08:50 PM
#4
PowerPoster
Mhm, I meant another function similary to this. But you can get the whole keys in one call like
-
Dim Keys(255) as Long
GetKeyboardState Keys
-
Something like that... Don't know which function u finally need...
------------------
[email protected]
...
Every program can be reduced to one instruction which doesn't work.
-
Feb 7th, 2000, 11:22 PM
#5
Thread Starter
New Member
Thanks guys. That will work, It is a bit better than what I had found.
If I use the array to get the results, is there a faster way than this to see if any of the array has been set to <> 0?
for x = 0 to 255
if Keys(x) <> 0 then
Presed = True
end if
next
if Pressed = True then ....
Thanks again for the help!
Glenn
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|