private void buttonCopy_Click(object sender, EventArgs e) { if (textBoxCommand.Text.Length > 0) { Clipboard.SetText(textBoxCommand.Text); if (this.checkBoxClearCopy.Checked) { textBoxCommand.Clear(); } } }