DenaMP
asked on
How to enable tabbing from hours to minutes in the datetimepicker?
I am a using quite a few datetimepickers set to a CustomFormat of military time:
dtpTimeToYard.CustomFormat = Format("HH:mm")
The problem is that my users want to tab from the hours to the minutes portion and are very annoyed that they can't do this. How do I give them this capablity? I have told them that they can use the right arrow key but this does not appease them. Thanks for your help!
dtpTimeToYard.CustomFormat
The problem is that my users want to tab from the hours to the minutes portion and are very annoyed that they can't do this. How do I give them this capablity? I have told them that they can use the right arrow key but this does not appease them. Thanks for your help!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
On the other hand, I think my users will be thrilled if they can use the enter key that's on the number pad instead of the tab key. But then, how should they navigate to from hours to minutes? I don't want to use a non-intuitive character on the number pad. Thanks for your help!
That post was only to show you the realm of possibilities, and not to be a specific answer to your question.
Do you still need advice?
Do you still need advice?
ASKER
If you know of a way to use the Enter key instead of the Tab key and still have the Enter key jump from hours to minutes in the datetimepicker, that would be great. Otherwise, I think I'm good. Thanks so much for your help!
Are you saying that this didn't work?
Private Sub dtpTimeToYard_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles dtpTimeToYard.KeyDown
If e.KeyCode = Keys.Enter Then
SendKeys.Send("{RIGHT}")
End If
End Sub
ASKER
It works, but not when I override the Enter key to act as a Tab key.
I don't quite understand the problem. Are you saying that you want the <Enter> key to tab to the next part of the control, or to another control?
ASKER
Can it do both?
How would you like to do that exactly?
hh<enter>mm<enter>ss<enter > --> next control
hh<enter>mm<enter>ss<enter
ASKER
Yes!
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Convert Enter and Escape keys to Tab and Shift-Tab for easy navigation in Visual Basic .NET
http://www.vb-helper.com/howto_net_enter_esc_to_tab.html
Open in new window