Pass Login \ Password \ Enter to an external application. C # with Windows Forms

0

I used the last code in

Program write in another textbox

To enter the login / password in the third-party program.

I did so:

Process processo = Process.Start(@"C:\Program Files (x86)\ZKTeco\ZKAccess3.5\Access.exe");
IntPtr h = processo.MainWindowHandle;
SetForegroundWindow(h);
processo.WaitForInputIdle(); // Isso aqui foi de extrema importância :D.

SendKeys.SendWait("admin");
SendKeys.SendWait("{TAB}");
SendKeys.SendWait("admin");
SendKeys.SendWait("{ENTER}");

It even calls the system, but does not pass the values to the respective fields.

    
asked by anonymous 11.09.2018 / 15:05

0 answers