Hi,
I've been looking at the SimpleOSRBrowser demo, and don't fully understand it.
The demo uses the same TChromium component as MiniBrowser, and it displays the websites on screen. What is it that makes it OSR?
Can the visible browser be used to login and browse to a specific webpage, and then "clone" that page in OSR mode with a different resolution? If I for example, would like to render a webpage at a resolution of 2000x3000, which is bigger than my screen.
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.
OSR Browser question
- salvadordf
- Posts: 4575
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: OSR Browser question
The OSR demos have a totally different way to show the web contents. Those demos get the raw bitmap data in the TChromium.OnPaint event and the application shows that data in a custom panel.Briskitte Bardot wrote: Mon Sep 14, 2020 6:21 pm Hi,
I've been looking at the SimpleOSRBrowser demo, and don't fully understand it.
The demo uses the same TChromium component as MiniBrowser, and it displays the websites on screen. What is it that makes it OSR?
A browser in OSR mode also uses some methods and events to handle the screen properties, mouse events, keyboard events, etc.
As I commented before, your application would have to use a TChromium event to inform the browser about the screen properties : size, scale, etc.Briskitte Bardot wrote: Mon Sep 14, 2020 6:21 pm Can the visible browser be used to login and browse to a specific webpage, and then "clone" that page in OSR mode with a different resolution? If I for example, would like to render a webpage at a resolution of 2000x3000, which is bigger than my screen.
https://github.com/salvadordf/CEF4Delph ... r.pas#L432
Read this for more information about the events used in OSR mode :
https://magpcss.org/ceforum/apidocs3/pr ... ndler.html
-
- Posts: 8
- Joined: Mon Sep 14, 2020 6:04 am
Re: OSR Browser question
Thank you very much for pointing me in the right direction.
One mistake I made was not noticing that the OSR demo used a TBufferPanel instead of a TCefWindowParent. Now I know how to proceed, with both this and the question I had in another thread about reloading a canvas.
I don't promise I won't be back with other questions though.

One mistake I made was not noticing that the OSR demo used a TBufferPanel instead of a TCefWindowParent. Now I know how to proceed, with both this and the question I had in another thread about reloading a canvas.
I don't promise I won't be back with other questions though.
