Page 1 of 1

Re: How use TChromium in no visual mode

Posted: Wed Mar 27, 2019 2:54 pm
by salvadordf
Hi,

You can use a TChromium component in off-screen mode (OSR).

First of all, read this page :
https://www.briskbard.com/index.php?lang=en&pageid=cef

Open the SimpleOSRBrowser demo and test your scripts.

After that you can remove the Panel1 (TBufferPanel) and delete the following procedures :
  • All Panel1* event procedures and Panel1PaintParentBkg.
  • chrmosrPaint
  • chrmosrCursorChange
  • chrmosrPopupShow
  • chrmosrPopupSize
  • chrmosrTooltip
  • chrmosrBeforePopup
  • chrmosrIMECompositionRangeChanged
You will have to modify chrmosrGetViewRect, chrmosrGetScreenPoint and chrmosrGetScreenInfo to use an imaginary panel with your custom dimensions and coordinates.

As a consequence of all this you will be able to delete more controls and procedures.

Re: How use TChromium in no visual mode

Posted: Wed Mar 27, 2019 4:44 pm
by salvadordf
There is a ConsoleBrowser demo with an off-screen browser but I don't have much experience with console applications and I don't know if you can make it work without a form.

That demo uses the single threaded message loop mode and calls GlobalCEFApp.RunMessageLoop. This means that CEF controls the message loop.

Perhaps you can use a hidden window with that demo.