10-08-2001, 09:27 AM
I wish to write a small program that will run a few events upon idle detection. In my search to figure out detection of idle, I came across the command getinputstate() which would work great with a timer for my purposes.
Problem is, in which API do I find this command?
Also, for the future, when I come across other commands or API types, what's the best way to determine how to add them to my project?
10-08-2001, 09:34 AM
Have a look in Tutor's Corner for some useful VB links. Specifically a cominbation of MSDN and AllAPI Guide should do you.
Also there's a Handy Tools post in Random Thoughts.
10-08-2001, 09:40 AM
1- Goto AllAPI.net
2- API List, check "G"
3- then you are in
I do not know many ways to work with API, and I know only
one way that works always with me. I think only one way that
works is sufficient. It satisfies me. I think that is the best way.
I am very happy if you show me other ways orther than the
common way we all know with API. If you do not know any
way at all, I will tell you the most common way.
10-09-2001, 06:56 AM
You've got me curious anhmytran! I was only aware of one way......declaring the API and using it. Is it really possible to work with API's another way? (appart from switching programming languages images/icons/smile.gif)
<font color=blue> :: grin-r :: </font color=blue>
10-09-2001, 07:23 AM
What you say is what I mean in my previous post.
10-09-2001, 08:15 AM
VB comes with (or at least mine did) an API text viewer. Load the Win32API or whatever its called, then you can search for the exactl API and it will show you the correct syntax. No explanation is given, but EVERY API is listed, and is therefore very useful. You can copy the declarations from there directly into VB. I dont know if you have it, but it came with VB 5.
10-09-2001, 12:25 PM
basdewaard, there is actually another way to work with APIs. It involves
creating a typelib file that has the proper declarations. Then, a reference
to the typelib is made, and the functions are available without a specific
function declaration. There are pros and cons of doing it this way, and
it is more complicated having to learn MIDL and compiling the typelib,
but in some cases, it is the best way.
Squirm, the API viewer doesn't come close to having all the APIs.
I think therefore I am... sometimes right. images/icons/wink.gif
10-09-2001, 03:23 PM
Really? Well, as The Hands says: 'Learn something new every day' images/icons/smile.gif