FocusNextObject
Interface AntView
Type: Method
Parameters: none
Returns: nothing
Will move the focus from the AntView object to the object as set by the NextFocusWindowHandle property.
This is mainly interesting for Visual FoxPro. The WebView2 control does not trigger the windows LostFocus event when used in VFP. As such it never detects that the focus left the control when you click on another control in your form. So what to do?
The workaround is to set NextFocusWindowsHandle to mainHwnd() (your form's window handle) and then in the Click event from the control you are navigating towards to call FocusNextObject which will then execute a Windows API setfocus to notify the AntView control that it has actually lost the focus.
Introduced in AntView release 1.1.330
AntView - The MS Edge WebView2 ActiveX control Date last changed: 09/25/2024