[DllImport("user32.dll", EntryPoint = "FindWindow")] private static extern IntPtr FindWindow(string IpClassName, string IpWindowName); [DllImport("User32.DLL")] public static extern int SendMessage(IntPtr hWnd, uint Msg, int wParam, string lParam); [DllImport("User32.DLL")] public static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow); public const uint WM_SETTEXT = 0x000C;
private const string USERID = "170809";
const int BM_CLICK = 0xF5;
IntPtr hwnd = FindWindow("#32770", "Verify U Password");
if (hwnd != IntPtr.Zero) { while (hwnd == IntPtr.Zero) ; IntPtr vHandle = FindWindowEx(hwnd, IntPtr.Zero, "Edit", null); SendMessage(vHandle, WM_SETTEXT, 0, USERID);
}
Auto-entry is possible, but the OK button cannot be clicked!!! Is there a big guy who comes out to give you some guidance!! Thank you very much
|