Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

MultiBrowser on the same form problems

Post Reply
User avatar
salvadordf
Posts: 4067
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: MultiBrowser on the same form problems

Post by salvadordf »

Hi,

You can base your app in the MDIBrowser demo. It can open several browsers at the same time and they can have different proxy configurations if you create a different request context for each of them.

Read the code comments for more info.
dilfich
Posts: 330
Joined: Thu Nov 30, 2017 1:17 am

Re: MultiBrowser on the same form problems

Post by dilfich »

Hi, salvadordf.
And you can still sample OSR browser as well as MDIBrowser? Without the visual part, just how to properly create and destroy multiple OSR in one application.
User avatar
salvadordf
Posts: 4067
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: MultiBrowser on the same form problems

Post by salvadordf »

Right now I'm very busy but you can try to replace the child forms in the MDIBrowser demo with the main form in the SimpleOSRBrowser demo.
You would also need to adapt the destruction sequence in the previous child forms to the new OSR child forms.
dilfich
Posts: 330
Joined: Thu Nov 30, 2017 1:17 am

Re: MultiBrowser on the same form problems

Post by dilfich »

I tried, but it's not exactly what you need. Form one, you need an example of simultaneous operation of several OSR browsers that for example open simultaneously different sites and save html code. No need to display the visual part. I create in the usual way "ChromOSR[Thrd]:= TChromium.Create (nil);" and I think it's wrong. :(
User avatar
salvadordf
Posts: 4067
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: MultiBrowser on the same form problems

Post by salvadordf »

Use the TChromium.OnClose event and set the "Result" parameter to TRUE.
User avatar
salvadordf
Posts: 4067
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: MultiBrowser on the same form problems

Post by salvadordf »

TChromium.CloseBrowser is asynchronous and you need to wait until the TChromium.OnClose event is triggered.

Perhaps the TabbedBrowser demo can be useful in your case. Each tabsheet has a browser and that demo has all the code necessary to close them correctly.
Post Reply