如何使用VB.Net获取弹出消息框中包含的控件的属性 [英] How can I get properties of controls contained in a popup message box using VB.Net

查看:331
本文介绍了如何使用VB.Net获取弹出消息框中包含的控件的属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在开发一个 VB.Net 项目,其中部分内容我抓到了一个弹出消息框它以某种方式显示和处理。

我的问题是我必须知道这个弹出窗口中包含哪些按钮(主要是它们的标题)。

这是可能?有人可以告诉我如何做到这一点?非常感谢一个样本。



谢谢。

Hi all,
I'm working on a VB.Net project where in part of it I catch a pop up message box when it's displayed and handle it in some way.
My problem is that I have to know what buttons are included in this pop up window (their captions mainly).
Is this possible? Can someone please tell me how this can be done? A sample would be much appreciated.

Thanks.

推荐答案

好吧,按钮只不过是更多的窗口。您只需在找到的消息框窗口中查找更多子窗口。



您不能从窗口获取句柄然后尝试将其转换为窗体对象并期望所有属性都能工作。它只是不起作用。
Well, buttons are nothing but more windows. You just look for more child windows of the message box window you found.

You can NOT just get the handle from a window and then try to cast it to a Form object and expect all the properties to work. It just doesn't work that way.


这篇关于如何使用VB.Net获取弹出消息框中包含的控件的属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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