我在webBrowser 添加了
StringBuilder stbd = new StringBuilder();
stbd.Append("<input name=Button onClick=document.all.WebBrowser.ExecWB(4,1) type=button value=另存为><input name=Button onClick=document.all.WebBrowser.ExecWB(6,1) type=button value=打印 id='Button2'> <input name=Button onClick=document.all.WebBrowser.ExecWB(7,1) type=button value=打印预览> <input name=Button onClick=document.all.WebBrowser.ExecWB(8,1) type=button value=页面设置> <input name=Button onClick=document.all.WebBrowser.ExecWB(22,1) type=button value=刷新> </p> </form>"); stbd.Append(@"<head></head><form><OBJECT id='WebBrowser' height='0' width='0' classid='CLSID:8856F961-340A-11D0-A96B-00C04FD705A2' VIEWASTEXT></OBJECT>");
stbd.Append(context);
webBrowser1.DocumentText = stbd.ToString();
运行时 按按钮 弹出对话框“该页上的ActiveX控件不安全。当前安全设置禁止运行该页面的不安全控件。因此,可能无法正确显示该页”
StringBuilder stbd = new StringBuilder();
stbd.Append("<input name=Button onClick=document.all.WebBrowser.ExecWB(4,1) type=button value=另存为><input name=Button onClick=document.all.WebBrowser.ExecWB(6,1) type=button value=打印 id='Button2'> <input name=Button onClick=document.all.WebBrowser.ExecWB(7,1) type=button value=打印预览> <input name=Button onClick=document.all.WebBrowser.ExecWB(8,1) type=button value=页面设置> <input name=Button onClick=document.all.WebBrowser.ExecWB(22,1) type=button value=刷新> </p> </form>"); stbd.Append(@"<head></head><form><OBJECT id='WebBrowser' height='0' width='0' classid='CLSID:8856F961-340A-11D0-A96B-00C04FD705A2' VIEWASTEXT></OBJECT>");
stbd.Append(context);
webBrowser1.DocumentText = stbd.ToString();
运行时 按按钮 弹出对话框“该页上的ActiveX控件不安全。当前安全设置禁止运行该页面的不安全控件。因此,可能无法正确显示该页”
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货