Programmatically Launch Tab Function Keys in a Windows VB.Net Application

How can I programmatically launch tab functionality in a Windows VB.Net application?

Currently, in my application, I use a single splitter when I press the tab key and the focus moves in the correct order.

However, I need to use the arrow keys to move the focus to the following controls, just like the focus happens when the user presses the tab keys.

Thanks at Advance

+3
source share
3 answers

SendKeys.Send(string) ( Systems.Windows.Forms). tab, SendKeys.Send("{TAB}").

, http://msdn.microsoft.com/en-us/library/system.windows.forms.sendkeys.aspx

+3

, , .

Windows Form ContainerControl - ProcessTabKey (Boolean trueForForward). , , this.ProcessTabKey(true) this.ProcessTabKey(false) .

+2

KeyDown Datagridview

   If e.KeyCode = Keys.Enter Then
        ' Your code here
        SendKeys.Send("{TAB}")
        e.Handled = True
   End If
+1

Source: https://habr.com/ru/post/1757940/


All Articles