DateTimePicker

  • Thread starter Thread starter Michel Vanderbeke
  • Start date Start date
M

Michel Vanderbeke

Hello,

Is it possible to open a DateTimePicker control when it gets the focus?

Thanks and greetings,

Michel
 
Add the following line to the DateTimePicker control's GotFocus (not Enter)
event.

My.Computer.Keyboard.SendKeys("%{DOWN}", True)

This sends an Alt+Down key sequence to the active window, which should be
the DateTimePicker. Due to the nature of inserting keys in the middle of
the input stream, it might not work 100% of the time.
 
Add the following line to the DateTimePicker control's GotFocus (not Enter)
event.

My.Computer.Keyboard.SendKeys("%{DOWN}", True)

This sends an Alt+Down key sequence to the active window, which should be
the DateTimePicker. Due to the nature of inserting keys in the middle of
the input stream, it might not work 100% of the time.

Is there a window's message that is sent to a control telling it to
expand? If so perhaps the OP could use the SendMessage API for a more
reliable way of expanding the dropdown.

Thanks,

Seth Rowe
 
Back
Top