How can I get properties of controls contained in a popup message box using VB.Net

前端 未结 1 1482
醉话见心
醉话见心 2021-01-07 14:57

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 k

相关标签:
1条回答
  • 2021-01-07 15:44

    I found this answer on the net on another website, I thought I should share it in case someone sees this question in the future:

    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.

    Note: Can some please answer me why I got a down vote on this question?? This really upsets me :/

    0 讨论(0)
提交回复
热议问题