2022-10-17, 12:33:01
(2022-10-13, 14:13:42)echolis Wrote: Exactly Wil, the Form.WindowType is set to 1 (Modal). In my instance, Form.ShowWindow is also set to 1 (In Top-Level Form). In my form Init, I'm immediately navigating to a URL; which I can confirm (with Fiddler) does successfully execute.
Hi,
Running this in a debugger didn't really help much, beyond that it all seems to run normal from the point of view of AntView.
My suspicion is that the creation of the out-of-process WebView2 control is playing havoc with the form initialization of the modal Fox Pro form.
One thing I tried was to see if I could change the form modality once the webview2 control is created by setting Form.WindowType to 1 from the OnCreateWebViewCompleted event.
eg.
Code:
thisform.WindowType = 1
But that triggers a readonly error.
My guess is that VFP does not allow you to change that after the form has been created (which is not uncommon for Windows)
Next thing I did - and that appears to work - is to set Form.ShowWindow to 2.
In that case the Form is created.
As you mentioned having ShowWindow set to 1, you might already know that, so I'm not sure how useful that is.
If the above doesn't help then I think I would try to create the AntView control dynamically.
Sadly that is currently a bit out of my league in as far as my current FoxPro knowledge goes. I will have a go at that, but figured to at least give you my current feed back on this issue.
--
Wil