How do I select the text in a DateTimePicker at runtime?
I am using two c# System.Windows.Forms.DateTimePicker controls to make a date range (From and To)
When a date range is invalid I want to set the focus and highlight the first DateTimePicker control (dtpFrom.)
This is my code:
the control has the Focus but the text is not highlighted.
if i use the keyboard arrow keys "to move around" in the control, then the text is highlighted.
I think if I can send the control a "arrow key" message it will work.
Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.