1. <tfoot id='TFhil'></tfoot>

        <i id='TFhil'><tr id='TFhil'><dt id='TFhil'><q id='TFhil'><span id='TFhil'><b id='TFhil'><form id='TFhil'><ins id='TFhil'></ins><ul id='TFhil'></ul><sub id='TFhil'></sub></form><legend id='TFhil'></legend><bdo id='TFhil'><pre id='TFhil'><center id='TFhil'></center></pre></bdo></b><th id='TFhil'></th></span></q></dt></tr></i><div id='TFhil'><tfoot id='TFhil'></tfoot><dl id='TFhil'><fieldset id='TFhil'></fieldset></dl></div>

        <small id='TFhil'></small><noframes id='TFhil'>

        <legend id='TFhil'><style id='TFhil'><dir id='TFhil'><q id='TFhil'></q></dir></style></legend>
        • <bdo id='TFhil'></bdo><ul id='TFhil'></ul>

        如何在 .net 中获取对 Internet Explorer 窗口句柄的引用

        How to get a reference to Internet Explorer#39;s window handle in .net(如何在 .net 中获取对 Internet Explorer 窗口句柄的引用)

        <tfoot id='8N0KR'></tfoot>

          • <legend id='8N0KR'><style id='8N0KR'><dir id='8N0KR'><q id='8N0KR'></q></dir></style></legend>

            <small id='8N0KR'></small><noframes id='8N0KR'>

              <bdo id='8N0KR'></bdo><ul id='8N0KR'></ul>
            • <i id='8N0KR'><tr id='8N0KR'><dt id='8N0KR'><q id='8N0KR'><span id='8N0KR'><b id='8N0KR'><form id='8N0KR'><ins id='8N0KR'></ins><ul id='8N0KR'></ul><sub id='8N0KR'></sub></form><legend id='8N0KR'></legend><bdo id='8N0KR'><pre id='8N0KR'><center id='8N0KR'></center></pre></bdo></b><th id='8N0KR'></th></span></q></dt></tr></i><div id='8N0KR'><tfoot id='8N0KR'></tfoot><dl id='8N0KR'><fieldset id='8N0KR'></fieldset></dl></div>
                    <tbody id='8N0KR'></tbody>
                  本文介绍了如何在 .net 中获取对 Internet Explorer 窗口句柄的引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  基本上,我正在尝试获取我一直在 C# 中自动化的 Internet Explorer 实例的 HWND.

                  Basically I am trying to get the HWND of an instance of Internet Explorer that I have been automating in C#.

                          SHDocVw.InternetExplorer IE = new SHDocVw.InternetExplorer();
                          IE.AddressBar = false;
                          IE.MenuBar = false;
                          IE.OnQuit += IE_OnQuit;
                          IE.Visible = true;
                          IE.Navigate2("www.bing.com");
                  

                  我想获得对它的窗口句柄的引用以进行进一步操作,但是如何做到这一点的唯一例子是在 C++ 中,我不确定如何在 C# 中做类似的事情.msdn 给出的示例是 here.

                  I would like to get a reference to it's window handle for further manipulation, however the only example of how to do this is in C++ and I am not sure how to do something similar in C#. The Example the msdn gave is here.

                  推荐答案

                  获取HWND很简单:

                  IntPtr hwnd = (IntPtr)IE.HWND;
                  

                  这篇关于如何在 .net 中获取对 Internet Explorer 窗口句柄的引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Performance overhead of using attributes in .NET(在 .NET 中使用属性的性能开销)
                  Accessing attribute info from DTE(从 DTE 访问属性信息)
                  c# Hide a property in datagridview with datasource(c#使用数据源隐藏datagridview中的属性)
                  Extract Display name and description Attribute from within a HTML helper(从 HTML 帮助器中提取显示名称和描述属性)
                  C# Attributes and their uses(C# 属性及其用途)
                  C# - Getting all enums value by attribute(C# - 按属性获取所有枚举值)

                  <small id='Qsxxp'></small><noframes id='Qsxxp'>

                  • <tfoot id='Qsxxp'></tfoot>

                    1. <i id='Qsxxp'><tr id='Qsxxp'><dt id='Qsxxp'><q id='Qsxxp'><span id='Qsxxp'><b id='Qsxxp'><form id='Qsxxp'><ins id='Qsxxp'></ins><ul id='Qsxxp'></ul><sub id='Qsxxp'></sub></form><legend id='Qsxxp'></legend><bdo id='Qsxxp'><pre id='Qsxxp'><center id='Qsxxp'></center></pre></bdo></b><th id='Qsxxp'></th></span></q></dt></tr></i><div id='Qsxxp'><tfoot id='Qsxxp'></tfoot><dl id='Qsxxp'><fieldset id='Qsxxp'></fieldset></dl></div>
                        <bdo id='Qsxxp'></bdo><ul id='Qsxxp'></ul>
                            <tbody id='Qsxxp'></tbody>

                            <legend id='Qsxxp'><style id='Qsxxp'><dir id='Qsxxp'><q id='Qsxxp'></q></dir></style></legend>