2
votes

I am making one "keyboard operated application" in which the user will use only keyboard. The user will use left and right arrow keys, sometimes Up and Down arrow keys to navigate through different controls while filling a form.For that I use the keydown event and use SendKeys.SendWait({TAB}) for right key and SendKeys.SendWait(+{TAB}) for left key.

I have one DateTimePicker with custome format of dd/MM/yyyy.

When the year part is selected and the user presses the left arrow key, the focus moves to month part. when the arrow key is again pressed the focus moves to day part.

What I want is that when the day part is selected and the user presses the left arrow key, focus should move to the previous control (SendKeys.SendWait(+{TAB})).

Please suggest a solution.

1

1 Answers

0
votes

Edit: The standard DateTimePicker does not expose any way to tell what element is selected, unfortunately, so it isn't possible to achieve this without creating your own control.