TAdvWebBrower Load HTML File

I drop a TAdvWebBrowser component on my form.

Shows it is initialized:
image

At run time I have tried using both LoadFile() and URL to load the html file. It does not load.

At design time I tried filling in the URL and it will load and show the html file.

What might I be missing?

Designtime is 32 bit, are you targeting 64 bit, or 32 bit and did you properly deploy the DLLs?
https://www.tmssoftware.com/site/edgechromium.asp

Targeting 32 bit, Yes the dll's are properly deployed. The System32 folder is for 64-bit files. The SysWOW64 make the use of 32-bit programs on Windows 64-bit version possible.

image

Any other ideas?

Can you define "does not load", are you getting an error, or just a blank page? What happens when you load an URL from a button click? can you provide a test application?

Just get a blank page, I have tried both LoadFile() and URL from a button click event with no results (You can see 3 buttons in the lower left corner of the following screen shot). I'm beginning to think it is due to some of the other components on the form that are causing the issue. There are components from ImageEn, Raize, DevExpress, etc..

In this image viewer I use ImageEn to show TIFF and PDF documents and I wanted to add the ability to show HTML files. In the following image I show a PDF file.

When I click on the HTML document I hide the ImageEn components and make the AdvWebBrowser component visible. I made the AdvWebBrowser component smaller to show it is indeed blank

At first I thought it might be due to the fact that the parent of the AdvWebBrowser component was a TRZSplitter component from Raize, so I made the AdvWebBrowser a parent of the main form and that did not work. I will try to see if it works on a form with nothing else, but if that works then I would be stumped as to why it would not work on this form. Will try now and let you know the results shortly.

Thanks for your help

.

Thanks for the additional info, this is really helpful! If anything comes up, please let me know so we can continue to find our where the issue lies.

I called a second form from the main document imaging form and it works when the AdvWebBrowser is on it's own form.

I'm going to try adding a TRZSplitter next and will let you know. If you have other ideas please let me know.

Is the TAdvWebBrowser child of a frame? If so, this could be the issue. You can try calling AdvWebBrowser.Initialize, to force initialization of the webbrowser after visualizing it. If the parent is not detected when loading the application, the browser is not capable of initializing. If the webbrowser is not child of a frame, but part of a control that's invisible at first, then this could also help by calling AdvWebBrowser.Initialize.

I will try the above shortly.

I added a TRZSplitter and another TAdvWebBrowser to one side of the splitter on this test form and sure enough it does not load the image.

Design Time:

Run TIme:

Adding the above line did not help. Do you by chance have Raize components installed. Free from GetIT.

I don't have raize components installed. In the above situation, with the splitter, is the webbrowser child of another component?

Yes, the one that does not show the HTML document (TAdvWebBrowser2) is a child of TRZSplitter1 and I did initialize it

image

Try to load the HTML only from the webbrowser.OnInitialized event.
When you create it at runtime, you cannot assume the browser is synchronously ready on the next line.

FYI, I could successfully drop a TPanel onto my form, then drop a TAdvWebBrowser onto the TPanel and it worked fine without the need to Initialize it.

I also could successfully drop a TRZPanel onto my form, then drop a TAdvWebBrowser onto the TRZPanel and it worked fine without the need to Initialize it.

Regarding you reply above, there is no OnInitialized event for the TAdvWebBrowser component.

...and to go with the above I added a TWebBrowser (Not a TAdvWebbrowser) component to the right side ot the TRZSplitter component and set the Navigate() property and it DID show the HTML file. For some reason the TAdvWebBrower component get trhown off by the TRZSplitter. If you have Delphi, Raize components are free to download form GetIT, and are quick to install so you can try it. You could always unistall them.

There IS and OnInitialized event

hmm, not in my version. Looks like I need to upgrade to the latest version. Now to figure out how to do that and hope it's not a lot of work to do so,

Downloading the latest version now. Are there any instruction on how to update or is it simply running an exe?

-download newest version
-run uninstaller old version
-run installer new version

Great News! After updating to the latest version, it now works. No need to call Initialize. The last time I updated was on 08/13/2020, not sure what version that would have been. Is there a way to see what version of components I have?

Thanks,
Mike