DateTimePicker Selected Text and Calender Control

  • Thread starter Thread starter mmobile
  • Start date Start date
M

mmobile

How can I programatically get the currently selected text from a
DateTimePicker? Also is there a way to programtically bring up the Calendar
Control?

Any help would be appreciated.
 
Selected text - I don't think it's possible.
Drop down - you can send a PageDown key to the DateTimePicker:

[DllImport("coredll.dll")]
private static extern void keybd_event(byte bVk, byte
bScan, int dwFlags, int dwExtraInfo);

private void OpenCalendar(DateTimePicker ctl)
{
ctl.Focus();
keybd_event((byte)Keys.PageDown, 0, 0, 0);
}
 
Back
Top