Supposed to press the button five on MS Calculator.Code:string lpszParentClass = "SciCalc"; string lpszParentWindow = "Rekenmachine"; //Dutch translation Calculator string lpszClass = "Button"; IntPtr hwnd = FindWindow(lpszParentClass, lpszParentWindow); IntPtr childhwnd = FindWindowEx(hwnd, IntPtr.Zero, lpszClass, "5"); SendMessage(childhwnd, (int)VKeys.VK_2, 0, 0); //VKeys.VK_2 = 0x32 SendMessage(childhwnd, (int)VKeys.VK_2, 0, 0);
It doesn't give any errors but it just doesnt work.
What did I do wrong?


Reply With Quote

Bookmarks