I want to send every item from my listbox to a notepad,but my logic is kinda beating me.
private void send_Click(object sender, EventArgs e)
{
var notepad =
I have a sample test, it works if you change SendKeys.Send to SendKeys.SendWait
List data = new List() { "Test", "hope", "It", "works","Or" };
foreach (var item in data)
{
Clipboard.Clear();
Clipboard.SetText(item);
//SendKeys.Send("^V");
//SendKeys.Send("{ENTER}");
SendKeys.SendWait("^V");
SendKeys.SendWait("{ENTER}");
}
Because the key applied later than update Clipboard and loop, so that issue happend.