Delphi, VCL ... rendering web components in a form

How can I make part of a site raster using delphi?

I recently saw the Raudus framework, which is the ExtJs snapping / wrapper for delphi. However, what is unique about this is that it makes the components look like a browser. It just works as a WYSIWYG designer for Javascript components in the Delphi IDE. I have not been able to try since I am using delphi personal (dbrtl is required for this). However, looking at the demo, it takes some time to render the components (even after changing them), so I believe that it is displayed through a web browser rendering engine or something like that ...

if someone knows something like this, but open, please let me know ... thanks in advance, t

+3
source share
3 answers

Some time ago, I discovered a secret ActiveX call: OleDraw . As it turned out, it is great for using the built-in WebBrowser component ( IWebBrowser2 ) to render HTML and capture output into a bitmap image.

The code might look something like this:

uses ActiveX, OleCtrls, SHDocVw;
b:=TBitmap.Create;
try
  b.Width:=SizeX;
  b.Height:=SizeY;
  OleDraw(WebBrowser1.OleObject,DVASPECT_CONTENT,b.Canvas.Handle,Rect(0,0,SizeX,SizeY));
  b.SaveToFile(FileName);
finally
  b.Free;
end;
+3
source

If you like how Internet Explorer displays the page, it will display correctly in TWebBrowser (the built-in component), and you can generate bitmap images from there.

http://delphi.about.com/od/vclusing/a/wb_scren_shot.htm

http://www.delphi3000.com/articles/article_4132.asp?SK=

0
source

HTML Dave Baldwin ( ) Delphi 2006 ( 2007). , , , Delphi .

0
source

Source: https://habr.com/ru/post/1734397/


All Articles