Infragistics ist ziemlich beliebt für WinForms und hat die Möglichkeit, für seine Datetime
... setting the MaskInput to {time} should get the behavior you are looking for.
If you only set the FormatString property, the the time will display only when
the control is in edit mode (when the cursor is in the control).
von http://forums.infragistics.com/forums/t/4172.aspx.
Aber ich denke, dritte Partei wird bezahlt werden.
Wenn Sie nach Windows Inhouse Control suchen, hat DatePicker eine Eigenschaft Format, die auf Time gesetzt werden kann. Achten Sie darauf, ShowUpDown auf True zu setzen.
oder
this.dateTimePicker1.CustomFormat = "hh:mm";
this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
.......
private void dateTimePicker1_ValueChanged(object sender, EventArgs e)
{
MessageBox.Show(dateTimePicker1.Value.TimeOfDay.ToString());
}
haben Sie versucht, die Timer-Steuerung –
Dies wird von Standard-Steuerelemente gut unterstützt. Ein einfaches Label, wenn Sie es nur anzeigen möchten. Eine MaskedEditBox, wenn Sie die Eingabe oder Bearbeitung erlauben möchten. –