private void Cut1_Click(object sender, EventArgs e) { if (TextBox1.SelectionLength > 0) { TextBox1.Cut(); } }
private void Edit(string editMenu) { switch (editMenu) { case "Undo": if (TextBox1.CanUndo == true) { TextBox1.Undo(); } break; case "Cut": if (TextBox1.SelectedText != "") { TextBox1.Cut(); } break; case "Copy": Clipboard.SetDataObject(TextBox1.SelectedText, true); break; case "Paste": TextBox1.Paste(); break; case "Delete": TextBox1.SelectedText = ""; break; case "BingSearch": string bingSearch = TextBox1.SelectedText; System.Diagnostics.Process.Start(string.Format("https://www.bing.com/search?q={0}", bingSearch)); break; } }
private void CutToolStripMenuItem_Click(object sender, EventArgs e) { TextBox1.Cut(); }
private void Cut_Click(object sender, RoutedEventArgs e) { TextBox1.Cut(); }