What I'm trying to do is get a handle to a TextBox in another windows form. I'm looking at it through Inspect.exe which is telling me the name is "Login:" and the classname is "Edit" (can't take a screenshot, sorry). I can get a handle to everything like buttons, static's..., except for Edit controls. I'm trying with this:
hwnd = FindWindow(null, "WindowTitle");
IntPtr hButton = FindWindowEx(hwnd, IntPtr.Zero, "Button", "Login");
IntPtr hUser = FindWindowEx(hwnd, IntPtr.Zero, "Edit", "Login:");
IntPtr hPass = FindWindowEx(hwnd, IntPtr.Zero, "Edit", "Pass:");
I tried using the label's as childAfter, but no success. Whatever I do, I can't get a handle to the Edit controls. Anyone have any clue what I might be doing wrong? Also it should be noted that the static controls have the same names as the edit controls.