Click to See Complete Forum and Search --> : Delete Key.... Simple Answer I hope


NV2002
February 16th, 2003, 02:06 PM
Hi All,

I am trying to process the DELETE key in a TreeView.


Private Sub _directoryTree_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles _directoryTree.KeyPress
If e.KeyChar = Convert.ToChar(Keys.Delete) Then
' MsgBox("Delete Key Pressed", MsgBoxStyle.Information)
End If
If e.KeyChar = Microsoft.VisualBasic.ChrW(46) Then
' MsgBox("Delete Key Pressed", MsgBoxStyle.Information)
End If
If e.KeyChar = ControlChars.Cr Then
' MsgBox("Enter Key Pressed", MsgBoxStyle.Information)
End If

End Sub

It seems to work with the Numeric Keypad <Delete Key>
but my editing section of my Keyboard it will not work ?

Where is the <Delete Key> constant code and how do I process it.

Nick