You are "buying water by the river:" Win Forms makes what you want here very easy:
1. put a DateTimePicker on your Form: 'TimePicker24
Set these Properties of the DateTimePicker:
Format: Custom
CustomFormat: HH: mm: ss tt
ShowTextBox: False
ShowUpDown: True
Checked: False
2. put a TextBox on your Form: 'TimeTextBox
3. create a ValueChanged EventHandler for the DateTimePicker:
private void TimePicker24_ValueChanged(object sender, EventArgs e)
{
TimeTextBox.Text = TimePicker24.Text;
}
You now have a fully functional 24-hour style time picker. Of course, you can set-up its initial properties as you wish.
I suggest you keep the current time value selected in the DateTimePicker ... as a DateTime value ... in a variable for further use:
private DateTime CurrentTime;
private void TimePicker24_ValueChanged(object sender, EventArgs e)
{
CurrentTime = TimePicker24.Value;
TimeTextBox.Text = TimePicker24.Text;
}