开发者

Avoid pressing . (period) key to move to next field in DateTime picker control

In datetime picker control the user has to press .(period) to move to differen开发者_Python百科t fields (like day, month year)

I want to override this behaviour by allowing the user to enter date without entering .(period)

Is there any to achieve this programmatically in C# winforms?

Thanks in advance.


Not very beautiful code but you could of course send the . automatically.
Just handle the ValueChanged event (which will only be called when the user has entered a "whole" value for date part he's currently editing) and in the event handler you add the code SendKeys.Send(".");.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜