PC Review


Reply
Thread Tools Rate Thread

Controls For Time

 
 
Atley
Guest
Posts: n/a
 
      27th Feb 2004
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?


 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      27th Feb 2004
* "Atley" <(E-Mail Removed)> scripsit:
> 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.

--
Herfried K. Wagner [MVP]
<http://dotnet.mvps.org/>
Website Address Changed!
 
Reply With Quote
 
Atley
Guest
Posts: n/a
 
      27th Feb 2004
Thank you so much, that worked perfectly..


"Herfried K. Wagner [MVP]" <hirf-spam-me-(E-Mail Removed)> wrote in message
news:c1njoq$1khpk6$(E-Mail Removed)...
> * "Atley" <(E-Mail Removed)> scripsit:
> > 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.
>
> --
> Herfried K. Wagner [MVP]
> <http://dotnet.mvps.org/>
> Website Address Changed!



 
Reply With Quote
 
Cor
Guest
Posts: n/a
 
      27th Feb 2004
Hi Atley,

>Thank you so much, that worked perfectly..


>> Have a look at the control's 'Format' and 'CustomFormat' properties.


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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding Controls At Run-Time [Win #C] MikeY Microsoft C# .NET 2 18th May 2006 06:12 PM
Do the controls have a Tip at run time? Doru Roman Microsoft C# .NET 2 10th Feb 2006 02:38 AM
Run Time Controls Gomathi Microsoft Dot NET Framework Forms 1 6th Dec 2005 08:07 AM
Controls at run time =?Utf-8?B?THVpcyBNZW5kZXM=?= Microsoft VB .NET 4 19th Oct 2005 05:44 PM
ASP.NET can you add controls at run time? Jax Microsoft C# .NET 3 17th Jan 2004 11:30 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:08 AM.