Sends the given keys to the active application, and then waits for the messages to be processed.
[Visual Basic] Public Shared Sub SendWait( _ ByVal keys As String _ ) [C#] public static void SendWait( string keys ); [C++] public: static void SendWait( String* keys ); [JScript] public static function SendWait( keys : String );
- The string of keystrokes to send.
Use SendWait to send keystrokes or combinations of keystrokes to the active application and wait for the keystroke messages to be processed. You can use this method to send keystrokes to an application and wait for any processes that are started by the keystrokes to be completed. This can be important if the other application must finish before your application can continue.
Note Because there is no managed method to activate another application, you can either use this class within the current application or use native Windows methods, such as FindWindow and SetForegroundWindow, to force focus on other applications.
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
.NET Framework Security:
- SecurityPermission for unmanaged code to call this method. Associated enumeration: SecurityPermissionFlag.UnmanagedCode