Chapter 27. Using the Windows Application Programming Interface


  • Introducing the Windows application programming interface (API)

  • Learning when you'll use the Windows API

  • Looking at documentation sources for dynamic link libraries (DLLs)

  • Writing VBA code for the Windows API

  • Practicing API programming with examples

Access and Visual Basic for Applications (VBA) help you develop powerful applications. Using the Windows application programming interface (API), you can take full advantage of the Windows graphical user interface (GUI) to create your own windows (forms), dialog boxes (message boxes), list boxes, combo boxes, command buttons, and so on. These objects make your application a Windows application. And that's what this chapter is all about.

Although this chapter concentrates on the API included with Windows, the concepts are applicable to other APIs as well, such as the Open Database Connectivity (ODBC) API, the Messaging Application Programming Interface (MAPI), and the Telephony Application Programming Interface (TAPI).

What the Windows API Is

The Windows API is a set of built-in code libraries extending the Windows interface. Access makes these libraries available to you and simplifies their use. The API libraries include functions that allow you to create windows, check systems resources, work with communications ports, send messages to applications, and access the Registry, among other things.

These functions hook directly into the internal workings of Windows. Although ...

Get Access® 2010 Bible now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.