Partager via


Extending Visual FoxPro with External Libraries

You can extend the native capabilities of Microsoft® Visual FoxPro® by taking advantage of the facilities of Microsoft® ActiveX® controls (.ocx files), ActiveX objects, and dynamic-link libraries (DLLs). External libraries make it possible for you to access not only the capabilities of other programs but also those of Microsoft® Windows®. For example, you can use an ActiveX control to read and update the Windows registry directly, or it can call system-level functions by linking to one of the DLLs in Windows.

In This Section

  • Accessing External Libraries
    In most cases, Visual FoxPro provides all the tools you must have to complete your application. However, occasionally you might find that an application requires additional functionality not available in Visual FoxPro already.

  • How to: Access ActiveX Controls and Objects
    You can use any Microsoft® ActiveX® control that is available on your computer. To use an ActiveX control, you add it to a form and then set its properties, write handlers for its events, or call its methods.

  • How to: Access Dynamic-Link Libraries
    If the functionality you require is available in a DLL, you can link to the library and call its functions.

  • How to: Access a Visual FoxPro Library
    Like a DLL, a Visual FoxPro library (.fll file) contains functions you can call as you would any other function.

  • Accessing APIs
    If your application has requirements that cannot be met by the features already built into Visual FoxPro, you can extend the program by taking advantage of external libraries — Microsoft® ActiveX® controls or dynamic-link libraries (DLLs).

  • Accessing the Visual FoxPro API
    If an external library is not available to suit your needs, you can write your own Microsoft® ActiveX® control or Visual FoxPro -specific dynamic-link library (.fll file). By calling the functions available in the API available in Visual FoxPro, you can create controls or libraries that are tightly integrated with and optimized for use in Visual FoxPro.