Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub DataGridView1_mt_KeyDown(sender As Object, e As KeyEventArgs) Handles DataGridView1_mt.KeyDown
- If e.KeyCode = Keys.Enter Then
- ...
- Private Sub DataGridView1_EditingControlShowing(sender As System.Object, e As System.Windows.Forms.DataGridViewEditingControlShowingEventArgs) Handles DataGridView1_mt.EditingControlShowing
- Dim tb As TextBox = CType(e.Control, TextBox)
- AddHandler tb.KeyDown, AddressOf TextBox_KeyDown
- End Sub
- Private Sub TextBox_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs)
- If e.KeyCode = Keys.Enter Or e.KeyCode = Keys.Return Then
- MessageBox.Show("Success") '''''DOES NOT WORK
- End If
- If e.KeyCode = Keys.Space Then
- MessageBox.Show("Success") '''''WORKS
- End If
- End Sub
- If e.KeyCode = Keys.Down Then
- 'code
- End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement