Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27159

Hot Key to jump out of a datagrid to a textbox

$
0
0
I have a winform with textboxes and three datagridviews on it. I am wondering if there is way to make a hot key so when you are in a datagridview it will jump you out of it and into another or to the textboxes on the form.

I have the following code started but I can't seem to figure out how to know what datagridview the cursor is currently in. I would like to use a Shift+Enter or Alt+Enter to jump around the form.
Code:

Private Sub pordersfrm_keydown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
        If (e.KeyCode = Keys.Enter AndAlso e.Modifiers = Keys.Control) Then

        End If

        If (e.KeyCode = Keys.Enter AndAlso e.Modifiers = Keys.Shift) Then

        End If

end sub

Thanks,
Stacy

Viewing all articles
Browse latest Browse all 27159

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>