PDA

Click to See Complete Forum and Search --> : API who ?


murphy
Jan 28th, 2001, 02:29 PM
HI

i c lots of examples which r using API and my question is this:
how can i know when do i need to use API and what
API command i need?
a simple example is, i want to pause the program
so i look for the "sleep" API command
but what about the more complex commands ?

parksie
Jan 28th, 2001, 02:58 PM
Sites such as www.allapi.net are useful for things like this, and the Platform SDK at http://msdn.microsoft.com is fantastic.

The SDK is good for finding what functions you need, then the VB-specific sites show you how to use them.

Vlatko
Jan 29th, 2001, 07:45 AM
Also Try:

http://www.vbapi.com

Jan 29th, 2001, 11:14 AM
You also might be able to tell what an API does by looking at its name. But once you get to use API a lot, you will become familiar with it, and it will come to you naturally.

DarkJedi9
Jan 29th, 2001, 03:21 PM
If you aren't sure whether or not to use an API, try looking whatever it is your trying to do with the MSDN that comes with VB. It will usually tell you about API functions that can help you. Also, as was said earlier, the names tend to reflect their purpose, so simply looking in the API viewer can help you find an appropriate API. You can than look up that function in the MSDN and it will explain - sort of - how to use it.

Jan 29th, 2001, 04:04 PM
The Platform SDK is documented in C++, so if you're not good at translating code, you can take a look some VB sites. (www.vbapi.com and www.allapi.net as well as this site).

parksie
Jan 29th, 2001, 04:07 PM
Or come here and yell for help :D

DarkJedi9
Jan 29th, 2001, 09:17 PM
Yeah, the translation can be a real pain. Fortunately, I'm taking C++ in school, although we're mostly teaching ourselves. I also learned about translation in this API book I've got called The Visual Basic 6.0 Developers Guide to the Win32 API, or some such thing. All the API declarations are given in C++ and VB code, plus he explains a little about translation at the beginning of the book.