我想检测另一个进程是否说process.exe当前正在显示一个对话框? 有没有办法在C#中做到这一点?
看看我是否可以获得对话框的句柄。 我尝试过Spy ++的查找窗口工具,当我尝试在对话框顶部拖动取景器时,它不会突出显示对话框,而是填充详细信息并提及AppCustomDialogBox并提及句柄编号
请告知我如何以编程方式检测到..
谢谢,
I want to detect whether another process say process.exe is currently displaying a dialog box ? Is there a way to do that in C# ?
To see if I could get the handle of the dialog box. I have tried Spy++ 's find window tool, when I try to drag the finder on top of the dialog box, it does not highlight the dialogbox but populates the details and mentions AppCustomDialogBox and mentions the handle number
Please advise how can I programatically detect that ..
Thanks,
最满意答案
由于模态对话框通常会禁用父窗口,因此您可以枚举进程的所有顶级窗口,并查看是否使用IsWindowEnabled()函数启用它们。
As modal dialogs normally disable the parent window(s), you can enumerate all top level windows for a process and see if they're enabled using the IsWindowEnabled() function.
更多推荐
发布评论