Click here to Skip to main content
15,887,477 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted
Comments
GAJERA 24-Apr-14 7:05am    
Thanks ,I have done it programmatically.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900