Visual FoxPro does not support the early binding and Intellisense features that other tools like Visual Basic provide that can automatically show the enumerated values. Therefore in Visual FoxPro the closest thing to an enumerated value is a constant defined in a header file (.h). For example we can define:
*** Constant Group: CursorTypeEnum #define adOpenUnspecified -1 #define adOpenForwardOnly 0 #define adOpenKeyset 1 #define adOpenDynamic 2 #define adOpenStatic 3
and then use these values in a VFP program or class by including the .H file in the PRG or VCX.
The GetConstants utility can be used to easily retrieve these COM constants and enumerated types from a COM typelibrary or COM DLL and dump them into ready to use #DEFINE constants in a .H file. The utility allows you to simply pick the DLL, TLB, OLB (office typelibs) or OCX files and dumps the contents into a header file of your choice.