Flush Method
Collapse the table of content
Expand the table of content

SendKeys.Flush Method

Processes all the Windows messages currently in the message queue.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

public static void Flush ()
public static void Flush ()
public static function Flush ()
Not applicable.

Use Flush to wait for the application to process keystrokes and other operating system messages that are in the message queue. This is equivalent to calling Application.DoEvents until there are no more keys to process.

NoteNote:

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.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2016 Microsoft