Is it possible to determine the height / width of content in a WebBrowser control? I would like to keep the contents of the image, but only with the size of the actual content.
Thanks in advance.
I believe that you can get it from the following property:
myWebBrowser.Document.ScrollRectangle.Size;
Being an object of System.Drawing.Size .
System.Drawing.Size
The document recounts the layout every time the browser window is resized, so it really does not have a fixed size.
You can use the golden section search to find the minimum window size large enough to hold a document, but this is a processor intensive task.
Source: https://habr.com/ru/post/1308063/More articles:How can I extract and save values ββfrom an XML file in Perl? - xmlhttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1308059/pointers-to-functions&usg=ALkJrhh8gSI1wvA8RYcrY1T8qMI4cEnvpgPHP REGEX - text to array by preg_split when line breaks - phpIs there a list comparing the capabilities of the various frameworks available for developing web applications in Perl? - securityhttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1308062/static-code-analysis-tool-for-detecting-uncaught-exceptions-in-a-c-code-before-compilation&usg=ALkJrhgdHWszENrb_rWDMkH4TyHsuUfHyQUI thread blocks background thread calling COM object - multithreadingjson_encode behaves differently in arrayObject vs array () - jsonOctave: multiple matrix sub-matrices - matrixset zoom level when removing marker - google-mapsSQLAlchemy - SQLite for testing and Postgresql for development - How is the port? - pythonAll Articles