Articles → CSHARP → Sendkeys.Sendwait() Function In C#Sendkeys.Sendwait() Function In C#This article provides an overview of the SendKeys.SendWait() method in C# and demonstrates how to use it.Purpose The SendKeys.SendWait() function sends the keystrokes to the active application.Example In this example, we will send the "ALT + F4" keystroke to Notepad. To demonstrate this, we have created a form with a button.Add the following code to the button's click event.SendKeys.SendWait("%{F4}");Output Run the application to see the following output.Click to EnlargePosted By - Karan Gupta Posted On - Thursday, July 15, 2021 Query/Feedback Your Email Id** Subject* Query/Feedback Characters remaining 250**
SendKeys.SendWait("%{F4}");
Query/Feedback