Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Gray Boxes shown in front of page
#1
Photo 
We have a simple page that has this html.

Code:
<!DOCTYPE html>
<html>
<head>
    <title>Simple Test Page</title>
</head>
<body>
    <p>Test</p>
</body>
</html>


When AntView displays it the page looks like this with gray boxes that don't scroll with the page.  
[Image: antview-grayboxes.png]

We are on a trial version. Is that what is causing this?

Phil
Reply
#2
Hi Phil,

It's not because you are on a trial license. That would be a bad thing if it was a side effect of running in trial mode.

This certainly is not normal. 

If I understand you correctly then the control does work if you navigate to a page such as google.com?
The "Test" that is currently displayed is rendered by the AntView control?

The only place where we've seen rendering issues is when using the control in a virtual environment. In that case you'll have to manually disable the hardware GPU rendering.
See the AdditionalBrowserArguments property documentation for more information on how-to do that.

--
Wil
Reply
#3
(2024-03-25, 14:51:15)Thanks for the reply Wila!This is a app running in Windows on a Parallels virtual machine. Is there a way to set the gpu flag programmatically? I followed the link and it looked like it was a command line argument when you start Chrome.Philwila Wrote: Hi Phil,

It's not because you are on a trial license. That would be a bad thing if it was a side effect of running in trial mode.

This certainly is not normal. 

If I understand you correctly then the control does work if you navigate to a page such as google.com?
The "Test" that is currently displayed is rendered by the AntView control?

The only place where we've seen rendering issues is when using the control in a virtual environment. In that case you'll have to manually disable the hardware GPU rendering.
See the AdditionalBrowserArguments property documentation for more information on how-to do that.

--
Wil
Reply
#4
Phil,

Running the control in a Parallels VM might explain the issue.

Before creating the AntView control set the property AdditionalBrowserArguments.

So in VB that would look along the lines of:

Code:
Private Sub Form_Load()

    EdgeWebBrowser.AdditionalBrowserArguments = "--disable-gpu"
    EdgeWebBrowser.CreateWebView
    EdgeWebBrowser.EventsUseHexadecimal = True ' For VB we need to use the Hexadecimal event variants
    EdgeWebBrowser.UnlockControl "ExampleCompany", "WI5PO2-2KSU3Q-HWFXFU-IUMU2V-QF8P2F"

--
Wil
Reply
#5
This is a Visual FoxPro form. I've added these statements to the init of the form.

thisform.oBrowser.additionalBrowserArguments = "--disable-gpu"
thisform.oBrowser.createWebView
thisform.oBrowser.EventsUseHexadecimal = .T.

The gray boxes still show up.
Reply
#6
Hi,

There are a number of other GPU flags that you can try which are listed at that command line website you found.
But before you go down that rabbit hole.. first check with Sysinternals Process Explorer that the "--disable-gpu" flag was actually passed to the external webview2 process. A screenshot of how it should look like is in the AdditionalBrowserArguments documentation.

Another thing to try is to see if you can confirm that the same problem happens with the WebView2 component itself.
There's a compiled version available from a link on this page: MS WebView .net example.

On top of all that you might also consider enabling logging and see if the log has something interesting to note about this issue, see AntView logging functionality.

Hope this helps tracking down the issue.
--
Wil
Reply
#7
The --disable-gpu didn't show in Process Explorer since the WebView was started instead a VFP app.

I ran the MS WebView.net example and it didn't have the problem.

I turned on logging for AntView and here is the log. It looks like the --disable-gpu is getting set.
Creating new log...
2024-03-28 08:39:34.331
2024-03-28 08:39:34.335 -------------------------------------------------------------------------
2024-03-28 08:39:34.339 ------ Starting new WebView2 instance ------
2024-03-28 08:39:34.340 -------------------------------------------------------------------------
2024-03-28 08:39:34.340 Application: C:\SherWare\AMPRO\ampro.EXE (8732)
2024-03-28 08:39:34.340 Win32
2024-03-28 08:39:34.340 Current Directory: C:\SherWare\AMPRO
2024-03-28 08:39:34.355 AntView loaded C:\PROGRA~2\AntView\Win32\AntView.ocx
2024-03-28 08:39:34.355 AntView version 1.1.354.0
2024-03-28 08:39:34.355 User: philsherwood
2024-03-28 08:39:34.355 Log Level: 1
2024-03-28 08:39:34.355 Initializing defaults
2024-03-28 08:39:34.375 Creating window $31610
2024-03-28 08:39:34.384 EventSink changed, creating inplace object $31612
2024-03-28 08:39:34.388 Reading Version = 1.1.354
2024-03-28 08:39:34.389 Configuring default userDataFolder.
2024-03-28 08:39:34.389 userDataFolder C:\Users\philsherwood\AppData\Local\Temp\ampro.EXE.WebView2\
2024-03-28 08:39:34.389 CreateWebViewOnCreate is set to false, not initializing WebView2 until requested.
2024-03-28 08:39:34.411
2024-03-28 08:39:34.416 -------------------------------------------------------------------------
2024-03-28 08:39:34.417 ------ Starting new WebView2 instance ------
2024-03-28 08:39:34.417 -------------------------------------------------------------------------
2024-03-28 08:39:34.417 Application: C:\SherWare\AMPRO\ampro.EXE (8732)
2024-03-28 08:39:34.417 Win32
2024-03-28 08:39:34.433 Current Directory: C:\SherWare\AMPRO
2024-03-28 08:39:34.433 AntView loaded C:\PROGRA~2\AntView\Win32\AntView.ocx
2024-03-28 08:39:34.433 AntView version 1.1.354.0
2024-03-28 08:39:34.448 User: philsherwood
2024-03-28 08:39:34.448 Log Level: 1
2024-03-28 08:39:34.448 Initializing defaults
2024-03-28 08:39:34.461 Creating window $410D74
2024-03-28 08:39:34.469 EventSink changed, creating inplace object $A1618
2024-03-28 08:39:34.474 Reading Version = 1.1.354
2024-03-28 08:39:34.475 Configuring default userDataFolder.
2024-03-28 08:39:34.475 userDataFolder C:\Users\philsherwood\AppData\Local\Temp\ampro.EXE.WebView2\
2024-03-28 08:39:34.475 CreateWebViewOnCreate is set to false, not initializing WebView2 until requested.
2024-03-28 08:39:34.499
2024-03-28 08:39:34.504 -------------------------------------------------------------------------
2024-03-28 08:39:34.505 ------ Starting new WebView2 instance ------
2024-03-28 08:39:34.505 -------------------------------------------------------------------------
2024-03-28 08:39:34.505 Application: C:\SherWare\AMPRO\ampro.EXE (8732)
2024-03-28 08:39:34.505 Win32
2024-03-28 08:39:34.521 Current Directory: C:\SherWare\AMPRO
2024-03-28 08:39:34.521 AntView loaded C:\PROGRA~2\AntView\Win32\AntView.ocx
2024-03-28 08:39:34.521 AntView version 1.1.354.0
2024-03-28 08:39:34.521 User: philsherwood
2024-03-28 08:39:34.536 Log Level: 1
2024-03-28 08:39:34.536 Initializing defaults
2024-03-28 08:39:34.547 Creating window $6C1088
2024-03-28 08:39:34.554 EventSink changed, creating inplace object $E30FB0
2024-03-28 08:39:34.559 Reading Version = 1.1.354
2024-03-28 08:39:34.560 Configuring default userDataFolder.
2024-03-28 08:39:34.560 userDataFolder C:\Users\philsherwood\AppData\Local\Temp\ampro.EXE.WebView2\
2024-03-28 08:39:34.560 CreateWebViewOnCreate is set to false, not initializing WebView2 until requested.
2024-03-28 08:39:34.578 Test if WebView2 control is OK.
2024-03-28 08:39:34.583 Start async creation of the WebView2 control.
2024-03-28 08:39:34.587 BrowserExecutableFolder:
2024-03-28 08:39:34.588 UserDataFolder: C:\Users\philsherwood\AppData\Local\Temp\ampro.EXE.WebView2\
2024-03-28 08:39:34.588 Setting environment options: chrome flags: [--disable-gpu] Language [] Min. Browser version [95.0.1020.44] Single Sign On False
2024-03-28 08:39:34.588 Reading InstallPath = C:\Program Files (x86)\AntView
2024-03-28 08:39:34.588 Trying to load the loader DLL as C:\Program Files (x86)\AntView\Win32\WebView2Loader.dll
2024-03-28 08:39:34.604 Loading from InstallPath : success.
2024-03-28 08:39:34.604 Loaded as C:\Program Files (x86)\AntView\Win32\WebView2Loader.dll
2024-03-28 08:39:34.604 Version = 1.0.1108.44
2024-03-28 08:39:34.620 Assigned loader library procedures.
2024-03-28 08:39:34.899 CreateAsync Success $31610
2024-03-28 08:39:34.899 WebView2 version 122.0.2365.92
2024-03-28 08:39:34.914 Event OnCreateWebviewCompleted HResult = 0x00000000 (S_OK)
Reply
#8
Phil,

That's weird, so the plot thickens.
The WebView2 control that's used by the .net example does not even set the --disable-gpu flag as far as I can recall.

Just to make sure we are chasing the correct issue.
Have you tested this with the standard VFP9 example that comes pre-installed with AntView under "C:\Users\Public\Documents\AntView\Examples\Visual FoxPro" ?

For the record I just ran the standard example using your test page as posted above, here on a Windows 11 VM running under VMware Fusion and it worked as expected.

In addition, I do not need to set the disable-gpu flag for my VMware Fusion install either, but that might be hardware specific as it still depends on the host hardware GPU if the VM can provide GPU acceleration or not.
--
Wil
Reply
#9
I feel stupid.

I found that there was an EdgeWebBrowser control inside of an EdgeWebBrowser control that was causing the gray boxes. I deleted the extra control and presto! The boxes are gone.

Sorry to trouble you!

Phil
Reply
#10
Phil,

Don't worry. These kind of things happen to the best of us, it certainly is a thing that could happen to me too.
I'm just glad that you figured out the reason for the problem and that it now works as it should be.
Also thanks for sharing the reason of the issues. 
I'm sure this thread is going to help someone in the future.

--
Wil
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)