using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Xml; using MouseKeyboardActivityMonitor.WinApi; using MouseKeyboardActivityMonitor; namespace dictionar_demo_1 { public partial class MainForm : Form { private readonly KeyboardHookListener m_KeyboardHookManager; private readonly MouseHookListener m_MouseHookManager; public MainForm() { InitializeComponent(); m_KeyboardHookManager = new KeyboardHookListener(new GlobalHooker()); m_KeyboardHookManager.Enabled = true; m_MouseHookManager = new MouseHookListener(new GlobalHooker()); m_MouseHookManager.Enabled = true; m_KeyboardHookManager.KeyPress += HookManager_KeyPress; } private void HookManager_KeyPress(object sender, KeyPressEventArgs e) { string x = string.Format("{0}", e.KeyChar); if (x == "f") { m_MouseHookManager.MouseDoubleClick += HookManager_MouseDoubleClick; } } private void HookManager_MouseDoubleClick(object sender, MouseEventArgs e) { Clipboard.Clear(); // i want to copy the selected text //from any document(like pdf, .html ,txt) // when i double-click a text } }//form }
SetText() method
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)