Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在日期时间选择器控件中,用户必须按 .(句点)才能移动到不同的字段(如日、月、年)
我想通过允许用户输入日期而不输入 .(句点)来覆盖此行为
有什么可以在 C# winforms 中以编程方式实现这一点吗?
提前致谢。
不是很漂亮的代码,但你当然可以.自动发送。 只需处理ValueChanged事件(仅当用户为他当前正在编辑的日期部分输入“完整”值时才会调用该事件)并在事件处理程序中添加代码SendKeys.Send(".");。
.
ValueChanged
SendKeys.Send(".");