Strange behavior of DateTimePicker?
DataTimePicker's value is very strange when it's with focus.
I build a Windows Form with a DateTimePicker and a toolbar, and I add a button to the toolbar. When this button is clicked, it should read the DateTimePicker's Value, and display it in a messagebox.
I run the application, edit the DateTimePicker's value, and kept it focus.
Then I clicked the button on the toolbar. (When I clicked the button, the DateTimePicker's focus was not lost)
And I found that the value displayed in the messagbox is different from the DateTimePicker's current display.
To solve this problem , I had to set focus on other controls before I read the DateTimePicker's value.
Is there any other way to solve this problem?