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);
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top