c# how to look in a child window for a button and click on it programatically
<p>I would like to know how can i activate a button programatically with the help of user32 dll. Thx for helping.</p>

<p>In the next code i get handle over my specific window. Now I would like to activate a button that this window has (the Open button). </p>

<p><strong>Is there a way I can search and print everything that the handler sees in the window (the button open, close...and so on)?</strong></p>

<p>Need help!!</p>

<p>Here is my code:</p>

<pre><code>StringBuilder bld = new StringBuilder(256);
  StringBuilder className = new StringBuilder(256);
        GetWindowText(hwnd, bld, 256);
        GetClassName(hwnd, className, 256);  
        string text = bld.ToString();
        if (text.Length &gt; 0)
        {
            Console.WriteLine("Pointer: " + hwnd.ToInt32().ToString() + " Window Title: " + text);
            if (text == "my_window") { 
                Console.WriteLine(bld.ToString()+"..."+className.ToString()+"..."+hwnd.ToString());

                System.IntPtr ptrChild = GetWindow(hwnd,5);
                IntPtr handll = FindWindow(className.ToString(), "my_window");
                if (handll == IntPtr.Zero)
                {
                    Console.WriteLine("not working");
                }
                SetForegroundWindow(handll);

               while (!handll.Equals(IntPtr.Zero)){ //HOW TO CHECK (FIND) FOR THE OK BUTTON?!}
..}
</code></pre>
