UI自动化库中是否有任何语句或方法来检测现在打开的每个表单的名称? [英] is there any statement or method in UI automation library to detect the name of each form that is open now?

查看:97
本文介绍了UI自动化库中是否有任何语句或方法来检测现在打开的每个表单的名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我们使用UI自动化库自动运行应用程序时,您知道如何理解现在打开的表单的名称吗?

UI自动化库中是否有任何语句或方法检测现在打开的每个表单的名称??

do you know how can I understand the name of the form that is open now, when we use UI automation library to automate running the application?
is there any statement or method in UI automation library to detect the name of each form that is open now??

推荐答案

FormCollection formCollection = Application.OpenForms;


我不熟悉UI自动化库,但WinForms应用程序中的Form.ActiveForm将返回对活动表单的引用;如果没有活动表单,则返回'null [ ^ ]。
I am not familiar with the "UI Automation Library" but Form.ActiveForm in a WinForms Application will return a reference to the active Form; if there is no active Form, it returns 'null [^].


这篇关于UI自动化库中是否有任何语句或方法来检测现在打开的每个表单的名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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