Controls For Time

  • Thread starter Thread starter Atley
  • Start date Start date
A

Atley

Are there any controls that come with VB.net 2003 that can be used to
show/select time without making a dropdown with every single possible time
in it?

What about the DateTimePicker? is there a way to bring the Time part of
that into the equation?

I can create a ComboBox and populate it with every possible combination of
times, but then it gets a little tedious to pick... I can use NumericUpDown
but then I need 3 controls (Hour, Minute, AM/PM) and I am not sure how to
set them to follow keystrokes and not be editable. I have tried setting
them readonly, but it is not exactly what I want.

Any Suggestions?
 
* "Atley said:
What about the DateTimePicker? is there a way to bring the Time part of
that into the equation?

Have a look at the control's 'Format' and 'CustomFormat' properties.
 
Hi Atley,
Thank you so much, that worked perfectly..

I add this before someone else read this thread in future with a Google
search or something because the answer was not complete.

It is no time control in this way.

The right answer is given by Chris Dunaway as you already saw.

To use the datetimepicker for times, set the Format property to either Time
or Custom (Use Custom if you want to control the format of the time using
the CustomFormat property). Then set the ShowUpDown property to true.

Cor
 
Back
Top