Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

drop TDateTimePicker programmatically? 2

Status
Not open for further replies.

corsair2

IS-IT--Management
Feb 21, 2001
55
0
0
GB
Hi folks,

Can anyone help by telling me how to have a TDateTimePicker component drop down programmatically ie - without any user input, for example when it gets the focus?

The Help Files insist that 'DroppedDown' can be used to set as well as get the state but - no it cann't!

Regards
 
You need to simulate sending an F4 function key to the DateTimePicker control using something like SendMessage or Perform.

Andrew
Hampshire, UK
 
as Andrew said, like this :

Code:
 datetimepicker1.Perform(WM_KEYDOWN, VK_F4, $003E0001);

--------------------------------------
What You See Is What You Get
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top