Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

OpenNETCF DateTimePicker V1.3

35 views
Skip to first unread message

Bill

unread,
Aug 16, 2005, 12:44:14 PM8/16/05
to
So I'm trying to use the OpenNETCF (V1.3) DateTimePicker to display and make
pickable the date and the time in a single control. I'm setting the
following properties:

this.dtpEventStart.CustomFormat = "MM/dd/yyyy hh:mmtt";
this.dtpEventStart.Format =
OpenNETCF.Windows.Forms.DateTimePickerFormat.Custom;

While the date and time are visible in the designer, when I run the
application only the date appears and is pickable in the control. Is there
some way I can have my cake and eat it too or am I going to have to use
separate controls for date and for time?

Bill

Sergey Bogdanov

unread,
Aug 17, 2005, 3:56:13 AM8/17/05
to
In a Form constructor where you set dtpEventStart, the control is not
created yet thus it didn't work. The problem can be solved by moving:

dtpEventStart.Format =
OpenNETCF.Windows.Forms.DateTimePickerFormat.Custom;

into the Load event of your form.


--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com

0 new messages