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 窗口句柄的引用

        时间:2023-07-25

        <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 窗口句柄的引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:在 Windows 任务计划程序中更改已计划任务的运行时间 下一篇:使用 com 可调用包装器将结构数组从 c# 传递到 C++

                  相关文章

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

                1. <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>

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