Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[VFP] WebView2 Container always on top / not contained within Page Frame
I'm attempting to use AntView on a VFP 9 form, inside of a Page Frame (tabs) control. It appears as if the control is properly associated with the second "Page" of the Page Frame, but it's being painted on top of everything. The desired result is for it to be contained within the second tab. It also seems to inherit the size of the page frame.

Here's how the form looks while editing:

Here's how the form looks if I manually select Page 2 of the page frame:

Lastly, here's how the form looks when it runs:

Can you email me a small example project that contains this problem to
I will take a look at it to see what I can find.

For those reading along.

This is indeed an issue.
The "gray box that appears on top of the tabs" even with the first tab activated until you navigate to the second tab is obviously not acceptable. This happens because the control was activated and navigated in the init method of the form.
There are some things in VFP that need the AntView control to work slightly different for it to be entirely happy without needing workarounds. For now that is on the list of things to research.
There is however a workaround.

The workaround for this issue is as follows.
You can't set the visible state of the AntView control before it is created and as such you need to wait for that until the control has been created.

As such setting the visible property to false in the OnCreateWebViewCompleted event works and gets rid of the gray box.

*** ActiveX Control Event ***

thisform.pageframe1.page2.oAntView.Visible = .F.


Forum Jump:

Users browsing this thread: 1 Guest(s)