private void Form1_Load( object sender , EventArgs e)
{
Application . Idle += new EventHandler (Application_Idle);
}
void Application_Idle( object sender , EventArgs e)
{
buttonCopy . Enabled = textBox1 . SelectionLength > 0 ;
buttonCut . Enabled = textBox1 . SelectionLength > 0 ;
buttonPaste . Enabled = Clipboard . ContainsText();
}