Im using SendKey
and those functions to send keystrokes to a window located by its Window Name
[DllImport("user32.dll")]
public static extern int FindWindow(
string lpClassName, // class name
string lpWindowName // window name
);
[DllImport("user32.dll")]
public static extern int SetForegroundWindow(
int hWnd // handle to window
);
Is there another way to send keystroke to a window without putting it in the foreground ?
Im switching between many windows and SendKey
is making some errors that I can't control, I can't use SendWait
no either putting some thread delays, it has to be the fastest possible ,
Im just looking how it can be done.