[DllImport(« user32.dll », EntryPoint = « FindWindow »)] extern statique privé IntPtr FindWindow(chaîne IpClassName, chaîne 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, chaîne lpszClass, chaîne lpszWindow) ; public const uint WM_SETTEXT = 0x000C ;
chaîne de const privée USERID = « 170809 » ;
const int BM_CLICK = 0xF5 ;
IntPtr hwnd = FindWindow(« #32770 », « Verify U Password ») ;
if (hwnd != IntPtr.Zero) { tandis que (hwnd == IntPtr.Zero) ; IntPtr vHandle = FindWindowEx(hwnd, IntPtr.Zero, « Edit », null) ; SendMessage(vHandle, WM_SETTEXT, 0, USERID) ;
}
L’entrée automatique est possible, mais le bouton OK ne peut pas être cliqué !! Y a-t-il un grand gars qui vient te donner des conseils !! Merci beaucoup
|