获取Window父类和窗口 [英] Get Window Parent Class and Window
本文介绍了获取Window父类和窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
显然,为了"SendKeys",到另一个打开的应用程序窗口,我需要知道它的父类和父窗口,如:
Apparently, in order to "SendKeys" to another open application's window, I need to know it's Parent Class and Parent Window, as in:
Dim ParenthWnd As New IntPtr(0)
Dim ParenthWnd As New IntPtr(0)
ParenthWnd = FindWindow(myParentClass,myParentWindow)   '这找到我之前打开过的记事本
ParenthWnd = FindWindow(myParentClass, myParentWindow) 'this finds the notepad that I have previously opened
但是假设我不知道Class或Window?我怎样才能找回它?
But suppose I don't know the Class or Window? How can I retrieve it?
谢谢。
BiggyD
推荐答案
您可以使用Spy ++确定窗口的标题和窗口类。 我不确定安装不包含Visual C ++的Visual Studio是否会安装Spy ++。 如果它不可用,SDK
UI自动化实用程序inspect.exe也能识别字幕和类。
You can determine a window's caption and window class with Spy++. I'm not sure if an installation of Visual Studio that did not include Visual C++ will have Spy++ installed. In the event it is not available, the SDK UI Automation utility inspect.exe is also capable of identifying captions and classes.
这篇关于获取Window父类和窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文