--------------------------- Message Title --------------------------- Message --------------------------- OK ---------------------------
private void timer1_Tick(object sender, EventArgs e){ if (comboBox1.SelectedIndex == 0 && hotkey.Ctrl_Middle()) //ctrl+mouse middle { timer_1(); } }
void timer_1(){ string clp = ""; if (!Clipboard.GetText().Contains(" -MessageBox text content -")) { clp = Clipboard.GetText(); //Old clipboardtext backup } SendKeys.Send("^c"); if (!string.IsNullOrWhiteSpace(Clipboard.GetText()) && Clipboard.GetText() != clp) { textBox1.Text = Clipboard.GetText(); //*************** } if (!string.IsNullOrWhiteSpace(clp)) { try { Clipboard.SetText(clp); } catch (Exception) { MessageBox.Show("Error : " + clp); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)