用两个时间控件,然后在第二个时间控件下拉选定时间赋值
你看看吧,对你有没用,有用就用
Dim dtp3 As WinForm.DateTimePicker = e.Form.Controls("DateTimePicker1")
Dim d1 As Date = dtp3.Value
Dim d2 As Date = e.Sender.Value
Dim d3 As Date = Date.Today
If d1 < d3
Dim t As TimeSpan = d2 - d1
Dim t1 As TimeSpan = d3 - d1
Dim tb1 As WinForm.TrackBar = e.Form.Controls("TrackBar1")
tb1.Maximum = t.Days
tb1.Value = t1.Days
Else
msgbox("工程还未开始",0,"提示")
End If