Use AntView in Visual FoxPro
Here are some specific tips for using the AntView control from within Visual FoxPro.
Please note that we're not Visual Fox Pro developers, but we have had great help from several VFP developers that have helped to improve the control as well as assisted with the examples as they are available.
In the AntView example folders under C:\Users\Public\Documents you can find code examples of using the AntView component.
There are two example projects and each is in their own folder. The most basic project is located at the "standard" folder.
Another more advanced project can be found at the "advanced" folder and it shows you how-to handle more advanced scenarios from within VFP.
These examples have been written by Visual FoxPro developers and are very worthwhile checking out.
Please make sure to read the following:
- Setup.txt (found in the example folders)
- The help that you can read within the AntView browser control after pressing the "Help" button when running the example.
By default VFP will only automatically be able to receive events for the main interface.
The AntView control however contains more interfaces that contain events. If you want to be able to consume those events then you have to create a specific event wrapper for that.
There's an example wrapper for the AntViewDocument interface.
You can find this example in the file avdevents.prg, we keep this file up to date with the version of the control.
There's also an example wrapper for the AntViewCookieManager interface in the "advanced" project folder.
Read the "Help" from within the application to read on how you can generate your own event wrappers for other interfaces.
Because in VFP only the form has a window handle, things work a bit different with navigation between the browser control and controls in your form.
For more info see FocusNextObject and FocusPreviousObject.
Please note that you have to select "remove examples" in the uninstall program to receive the latest updates in the examples. If you don't select that then the example project will be untouched. This is nowadays the default.
Special thanks goes to:
- Jon Goad, who wrote the initial example.
- Tam Dobie, who has done a fantastic job on writing the new examples.
AntView - The MS Edge WebView2 ActiveX control Date last changed: 09/25/2024