views:

17

answers:

1

How can I programatically trigger the tab key functionality in a VB.Net windows application?

Currently in my application I am using one splitter when I press the tab key, and the focus is moving in the right order.

However I need to use arrow keys to move the focus to next controls, in the same way that the focus is going when the user presses the tab keys.

Thanks in Advance

A: 

You can simulate the SendKeys.Send(string) method (in the Systems.Windows.Forms namespace). To simulate a tab keypress you would call SendKeys.Send("{TAB}").

To see all the key codes, check out http://msdn.microsoft.com/en-us/library/system.windows.forms.sendkeys.aspx

KallDrexx