首页 > Web开发 > 详细

axWebrower 自定义证书 如何处理

时间:2017-07-08 10:58:40      阅读:405      评论:0      收藏:0      [点我收藏+]
      private void timer1_Tick(object sender, EventArgs e)
        {
            int iHandle = FindWindow(null, "安全警报");
            if (iHandle != 0)
            {
                SetForegroundWindow(iHandle);
                System.Windows.Forms.SendKeys.SendWait("Y%");
            }
            iHandle = FindWindow(null, "脚本错误");
            if (iHandle != 0)
            {
                SetForegroundWindow(iHandle);
                System.Windows.Forms.SendKeys.SendWait("Y%");
            }
            iHandle = FindWindow(null, "Web 浏览器");
            if (iHandle != 0)
            {
                SetForegroundWindow(iHandle);
                System.Windows.Forms.SendKeys.SendWait("{ENTER}");
            }
        }

先贴代码。

吐槽某大公司的大系统。登个陆要跳单点,单点要要过五关斩六将。

另外,前面还需要引入dll,开头部分引入

        [DllImport("user32.dll")]
        public extern static int FindWindow(string lpclassname, string lpwindowname);

        [DllImport("user32.dll")]
        public extern static void SetForegroundWindow(int handle);

 

axWebrower 自定义证书 如何处理

原文:http://www.cnblogs.com/xiaee/p/7135981.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!