Zoom in on a web page using WebBrowser .NET control

后端 未结 6 937
小鲜肉
小鲜肉 2020-11-30 04:23

In IE7 there\'s a \"zoom\" feature built-in (show in the status bar), allowing you to zoom in up to 400%. I\'m using the WebBrowser .NET control in a demo/simulation app, an

6条回答
  •  独厮守ぢ
    2020-11-30 05:01

    Easy tip:

    //Zoom IN
    webBrowser1.Focus();
    SendKeys.Send("^{+}"); // [CTRL]+[+]
    
    //Zoom OUT
    webBrowser1.Focus();
    SendKeys.Send("^-"); // [CTRL]+[-]
    
    //Zoom 100%
    webBrowser1.Focus();
    SendKeys.Send("^0"); // [CTRL]+[0]
    

提交回复
热议问题