在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
1.引用COM:MicroSoft Internet Controls 2. 核心代码如下: private void button2_Click(object sender, EventArgs e) { IWebBrowser2 axIWebBrowser2 =(IWebBrowser2) this.webBrowser1.ActiveXInstance; //关键代码 Zoom(axIWebBrowser2,150); } public void Zoom( IWebBrowser2 axIWebBrowser2,int factor) { object pvaIn = factor; try { axIWebBrowser2.ExecWB(OLECMDID.OLECMDID_OPTICAL_ZOOM, OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER, ref pvaIn, IntPtr.Zero); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论