Results 1 to 8 of 8

Thread: API who ?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2001
    Posts
    116

    Question

    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 ?
    10x,
    Amos

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

  4. #4
    Guest
    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.

  5. #5
    Lively Member
    Join Date
    Jun 2000
    Posts
    124

    Cool MSDN Works, too

    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.
    On Error Resume Screaming...

  6. #6
    Guest
    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).

  7. #7
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Or come here and yell for help
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  8. #8
    Lively Member
    Join Date
    Jun 2000
    Posts
    124

    Cool Translation

    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.
    On Error Resume Screaming...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width