最終更新:2015-03-31 (火) 15:35:13 (3314d)  

DoEvents
Top / DoEvents

メッセージ キューに現在ある Windows メッセージをすべて処理します。

.NET

呼び出し

WPF

using System.Windows.Threading;

public void DoEvents()
{
    DispatcherFrame frame = new DispatcherFrame();
    Dispatcher.CurrentDispatcher.BeginInvoke(DispatcherPriority.Background,
        new DispatcherOperationCallback(ExitFrames), frame);
    Dispatcher.PushFrame(frame);
}

public object ExitFrames(object f)
{
    ((DispatcherFrame)f).Continue = false;

    return null;
}

関連