Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 1.1
.NET Framework
Reference
Class Library
SendKeys Class
Methods
 SendWait Method
This page is specific to
Microsoft Visual Studio 2003/.NET Framework 1.1

Other versions are also available for the following:
.NET Framework Class Library
SendKeys.SendWait Method

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
);

Parameters

keys
The string of keystrokes to send.

Remarks

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.

Requirements

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: 

See Also

SendKeys Class | SendKeys Members | System.Windows.Forms Namespace

© 2010 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker