zoom web browser control - c#

You might have to use web browser controls in C# applications. In this case you need to zoom web page in the web browser control for some purpose. As an example I was needing to get a screen shot of a web browser pages and there for I needed to zoom it up to 125%. There is a code to do zooming purpose and you have to write it in the webBrowser_DocumentCompleted method.

private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
        {
            webBrowser1.Document.Body.Style = "zoom:125%";
         }

Comments

Popular Posts