1

I'm trying to use the Windows API SendMessage to find and click a button. It currently works when the Windows form has a standard button with text, but not when the button is in the form of an image with no text.

    hwndChild = FindWindowEx((IntPtr)hwnd,IntPtr.Zero,"Button","Open");

As you can see, I'm trying to find the "Open" button, but it cannot be found because the button designed with an image instead of text. How can I fix or work around this..?

Micha
  • 5,117
  • 8
  • 34
  • 47
First Second
  • 117
  • 2
  • 2
  • 10
  • Use a tool like [Spy++](http://msdn.microsoft.com/en-us/library/dd460760.aspx) to find attributes that can identify the control: ".. a Win32-based utility that gives you a graphical view of the system's processes, threads, *windows*, and window messages." (Of course, neither Spy++ nor FindWindowEx will help with lightweight controls such as those found in WPF or Swing.) – user2246674 Jul 25 '13 at 19:22

0 Answers0