DatePicker Dropdown

  • Thread starter Thread starter Vayse
  • Start date Start date
V

Vayse

Hi
Is there a way to make the picker drop down through code?
Thanks
Vayse
 
There isn't any native Win32 message or method to do it, but the following
is a workaround:

DateTimePicker1.Focus()
SendKeys.SendWait("%{DOWN}")

Basically it emulates a user pressing the button.

/claes
 
Hi

From your description, I understand that you are using the
System.Windows.Forms.DateTimePicker, and you want to show the Calendar by
code.
Have I fully understood you? If there is anything I misunderstood, please
feel free to let me know.

Based on my research, the DateTimePicker control, did not expose such
interface for us to use for showing the Calendar. It only expose to the UI
interactive when you click the arrow in the control.

As a workaround, I think you may try to show another MonthCalendar control
in the proper place and interactive it with DateTimePicker.
e.g. When someone click one date 2,5, 2005 ,we can set it via the code
below.
Me.DateTimePicker1.Value = New Date(2002, 2, 5)

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

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

Similar Threads

Reading databound value 6
Clearing a combo box 1
Datepicker Update- updates once and once only 2
Q: DatePicker 2
Make form full screen 4
Bold dates on Date Time Picker 0
Outlook from .dotx to .oft 1
Databound Form - Edit 9

Back
Top