private void treeViewMain_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) { if(e.KeyData == Keys.Delete) { this.DeleteItem(); } }