clipboard Listener event is being called twice
问题 i want to save the changes in my clipboard. so i registered my application to get all the changes that happens to the Clipboard. Using [DllImport("User32.dll")] protected static extern bool AddClipboardFormatListener(int hwnd); and then protected override void WndProc(ref Message m) { switch (m.Msg) { case WM_CLIPBOARDUPDATE: OnClipboardChanged(); break; ... } } private void OnClipboardChanged() { if (Clipboard.ContainsText()) { MessageBox.Show(Clipboard.GetText().ToString()); } } The Problem