如何获取外部应用程序控件句柄(hWnd)和名称? (VB.NET) [英] how to get external application controls handle (hWnd) and name ? (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.
推荐答案
^ ],它具有VB.NET解决方案,该解决方案使用FindWindow()
API调用来获取应用程序的句柄,然后使用FindWindowEx()
来获取控件在该应用程序上.请注意,它对ClassName
参数大小写敏感.
Take a look at this thread[^], which has a VB.NET solution using theFindWindow()
API call to get the handle of the Application, thenFindWindowEx()
to get the control on that application. Note that it is sensitive to theClassName
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屋!