如何获取外部应用程序控件句柄(hWnd)和名称? (VB.NET) [英] how to get external application controls handle (hWnd) and name ? (VB.NET)

查看:750
本文介绍了如何获取外部应用程序控件句柄(hWnd)和名称? (VB.NET)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的成员们,大家好..

首先要感谢您的所有写信,解决方案..

但是我找不到答案..

我必须输入进程名称,processID,主窗口hWnd,菜单
的hWnd 外用.但是如何获取Button,Listbox,textbox或其他控件的句柄或名称呢?

我将要开始的地方..?


示例:FindWindowEx,AccessibleObjectFromPoint,AccessibleObjectFromEvent,AccessibleObjectFromWindow等.

请帮我寻找方法或写示例代码?

感谢前进和最好的问候.

Dear members, hi to all..

First to be thanks all your wrotes, solutions..

But i can''t find to answer..

i have got to process name, processID, main window hWnd, Menu hWnd of
external application. But how to get Button, Listbox, textbox or etc. controls handles or name ?

Where i will begin to..?


Example : FindWindowEx, AccessibleObjectFromPoint, AccessibleObjectFromEvent, AccessibleObjectFromWindow etc..

Please help me for methods or write to sample code piece ?

thanks advance and best regards.

推荐答案

Take a look at this thread[^], which has a VB.NET solution using the FindWindow() API call to get the handle of the Application, then FindWindowEx() to get the control on that application. Note that it is sensitive to the ClassName parameter case.


您是否尝试过查看msdn论坛?
have you tried looking at the msdn forums?


Henry Minute,也谢谢您进行重定向和回复.
vlad781,是的,我期待着msdn,但我听不懂,我将从哪里开始编写代码.因此,我问你.感谢您的答复.

我喜欢codeproject..
Henry Minute, thank you too for your redirect and your reply.
vlad781, yes i look to msdn but i can''t understand, and where i''ll begin the code. Therefore i asked you. Thank you for your reply.

i love codeproject..


这篇关于如何获取外部应用程序控件句柄(hWnd)和名称? (VB.NET)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆