答案 0 :(得分:0)
您需要处理事件,因为dateTimePicker的值可能会更改。
在以下代码中,我处理dtpTime.ValueChanged
和MyBase.Load
Private Sub dtpTime_ValueChanged(sender As System.Object, e As System.EventArgs) Handles dtpTime.ValueChanged, MyBase.Load
If dtpTime.Text = "12:00:00" Then
' Enable your button
btnTimeOut.Enabled = True
'MsgBox("Hello")
End If
End Sub