0

why is this not working? I use WPF and import the Windows Forms Sendkey.

private void Send(Key key)
{
    while (StartStop_Clicked == true)
    {
        System.Windows.Forms.SendKeys.Send(MessageTextbox.Text);
        System.Windows.Forms.SendKeys.Send("{ENTER}");
    }
}
Grigory Zhadko
  • 1,484
  • 1
  • 19
  • 33
  • Look at: **1)** [How can I programmatically generate keypress events in C#?](https://stackoverflow.com/a/1646568/6630084) **2)** [SendKeys.Send Method in WPF application](https://stackoverflow.com/q/11572411/6630084) – Jackdaw Mar 24 '21 at 00:09
  • Yes it is explained in the same way here – LordBene Mar 25 '21 at 07:41

0 Answers0