thanks again for your jx....i don't understand a few things....will u explain them...thank u...here is my updated code
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
Dim btimeA As DateTime
btimeA = FormatDateTime(Btime1.Value, DateFormat.LongTime)
If FormatDateTime(TimeOfDay, DateFormat.LongTime) = btimeA.AddMinutes(20) Then
MsgBox("Booking Time up Mr/Miss " & Bcusname1.Text & " is late,reservation canceled")
Table1.BackColor = Color.PaleGreen
status2 = "Available"
End If
End Sub
As you can see the above one is for the
timer....i would like to place the btimeUp in the button,coz once i click the button it changes in yellow...so, i decided to put the btimeup in the button...i did something like this...
Private Sub bubu_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RButton.Click
If tableno = 1 Then
Dim bTimeUp As DateTime
bTimeUp = TimeSerial(btime1.Hour - 2, btime1.Minute, btime1.Second)
If TimeSerial(TimeOfDay, DateFormat.LongTime, DateFormat.LongTime) Then
status1 = "Booked"
Table1.BackColor = Color.Khaki
Spanel.Hide()
Rpanel1.Show()
End If
But somehow this line is giving problem
bTimeUp = TimeSerial(btime1.Hour - 2, btime1.Minute, btime1.Second)
can u help me out with this....