Sherri,
What you need to do is subscribe to the KeyUp event for the treeview.
Then, in that handler, if the delete key is pressed, get the current node,
and pass it to the Remove method on the TreeNodeCollection that it belongs
to.
Hope this helps.

Signature
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
>I need to be able to delete a tree node by clicking on the Delete key
> on the keyboard. (Basically, clicking on the Delete key calls a method
> which performs the delete.) An explanation and/or example would be
> very much appreciated.
sherri - 14 Aug 2006 15:53 GMT
Thanks Nicholas!
How do I tell which key was pressed? (The rest seems very
straightforward.)
> Sherri,
>
[quoted text clipped - 13 lines]
> > which performs the delete.) An explanation and/or example would be
> > very much appreciated.
Mini-Tools Timm - 14 Aug 2006 16:17 GMT
> Thanks Nicholas!
>
> How do I tell which key was pressed? (The rest seems very
> straightforward.)
I'd recommend watching for the KeyDown event. You can get which key was
pressed in the KeyEventArgs object as follows:
private void MtMessageBalloon_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Delete)
{
// handle delete key
}
}

Signature
Timm Martin
Mini-Tools
.NET Components and Windows Software
http://www.mini-tools.com
Mini-Tools Timm - 14 Aug 2006 16:18 GMT
> Thanks Nicholas!
>
> How do I tell which key was pressed? (The rest seems very
> straightforward.)
I'd recommend watching for the KeyDown event. You can get which key was
pressed in the KeyEventArgs object as follows:
private void TreeView_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Delete)
{
// handle delete key
}
}

Signature
Timm Martin
Mini-Tools
.NET Components and Windows Software
http://www.mini-tools.com