本文介绍了如何获取GINA“法律声明DialogBox”的窗口句柄?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我想点击法律声明DialogBox的OK按钮,然后点击它,然后点击它。
有没有办法获得GINA的法律声明DialogBox的窗口句柄。我已尝试使用以下代码但无法正常工作。
私有IntPtr getWindow()
{
资源管理器资源管理器=上下文作为资源管理器;
IntPtr explorerHandle =(IntPtr)0;
if(explorer!= null)
{
IOleWindow window = explorer as IOleWindow;
if(window!= null)
{
window.GetWindow(out explorerHandle);
}
}
返回explorerHandle;
}
private void enterKey()
{
try
{
SendKeys.SendWait({ENTER});
}
catch {
}
}
是否有一个人建议如何获得这个窗口的句柄?
最好,
Mahen
解决方案
Hi all,
I want to click on OK button of the "Legal notice DialogBox" For that first capture window of it and then click on it.
Is there any way to get window handle of the "Legal notice DialogBox" of GINA.I have try with below code but couldn't work.
private IntPtr getWindow() { Explorer explorer = Context as Explorer; IntPtr explorerHandle = (IntPtr)0; if (explorer != null) { IOleWindow window = explorer as IOleWindow; if (window != null) { window.GetWindow(out explorerHandle); } } return explorerHandle; } private void enterKey() { try { SendKeys.SendWait("{ENTER}"); } catch{ } }
Does any one suggest the way to get the handle of this window?
Best,
Mahen
解决方案
这篇关于如何获取GINA“法律声明DialogBox”的窗口句柄?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!