Click to See Complete Forum and Search --> : What is
mark_dep
May 25th, 2000, 04:09 AM
Hi There,
Im fairly new to programming, I have never used an API, the reason for this being that I do not know what one is or what one does, could someone please explain them, and possibly tell me how to get started using them.
Thank You
Mark
Go to http://www.vbapi.com to get a list of different API's, what they do and how to use them.
To add an API to your project, you can use the API Text Viewer which is shipped with VB.
Kazim Zaidi
May 28th, 2000, 08:48 AM
API
I'm very old to programming but I have came through the API only a few months ago. When I used API, I saw it is FANTASTIC! I will tell you in breif what is API and how to use it.
What is API (Application Programming Interface)?
First of all, I want to tell you that VB is fully dependent on API. API is a heap of Functions of Windows. These functions include everything that can be done in Windows. From Creating Forms to Using Registry....Even it can control every pixel(dot) on your screen. Currently, In Windows 98, there are approximiatly (to my knowlede) over 1000s of API Functions.
How Visual Basic works with API?
Visual Basic is totally dependent on API. In other words, API is the backbone of Visual Basic. When an application with a form is executed in Visual Basic, Visual Basic calls the API function for creating a form, loading it, and then displaying it. The properties of the form describe how it should look like, and How it should behave. For Example, the following function is used to Load a form and display it on the screen:
You don't have to worry how form would be loaded, VB would automaticaly load it by calling the API function:
Function CreateWindow (strCaption As String, sngLeft As Single, sngTop As Single, sngWidth As Single, sngHeight As
Single, lngHandle As Long)
The above function is called by VB when and as a result you get A form on the Screen. The first arguments defines the Caption of Window, which you give in property Caption. The next four arguments define the Window Rectangle. And the variable given in next argument recieves the handle of the form.(a long value by which Windows and Controls are identified in Windows, i.e. every window has a hWnd.)
continues...
Author - Kazim Zaidi
You have permission to
distribute this Article
anywhere with the name
of the Author.
Next Topic: How to declare API Functions..........If you want the documentation for this topic, then send a reply message please so that I know that I'm not alone.
MY FAVOURITE WARNING: REMEMBER TO USE API's WITH CAUTION. EXPERMENTATION WITH API IS NOT GOOD.
api may look hard, but its extremely easy...
its just like using things in vb like
Me.Move(Left As Single,[Top],[Width],[Height])
you just have to know what they are, and what the things(IE left, top,width, etc) do, and mean
also, its almost exactly like Vb but you have to delcare the functions first.. oh, API is alot more powerful..
playing with a few registry keys without knowing what your doing coulld screw quite alot of stuff up...
like, your computer may not boot, if it does, it could be severly screwed up....
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.