我想做一个提示时间的软件,怎么处理时间比较
thisform.Label1.caption=TIME()DO case
CASE TIME()>={8:10:00} and TIME()<={8:15:00}
thisform.label2.Caption ="上午第一节课:8:20开始上课"
CASE TIME()>={9:05:00} and TIME()<={9:10:00}
thisform.label2.Caption ="上午第二节课:9:15开始上课"
CASE TIME()>={10:10:00} and TIME()<={10:15:00}
thisform.label2.Caption ="上午第三节课:10:20开始上课"
CASE TIME()>={11:05:00} and TIME()<={11:10:00}
thisform.label2.Caption ="上午第四节课:11:15开始上课"
CASE TIME()>={13:20:00} and TIME()<={13:25:00}
thisform.label2.Caption ="下午第一节课:1:30开始上课"
CASE TIME()>={14:15:00} and TIME()<={14:20:00}
thisform.label2.Caption ="下午第二节课:2:25开始上课"
CASE TIME()>={15:10:00} and TIME()<={15:15:00}
thisform.label2.Caption ="下午第三节课:3:20开始上课"
CASE TIME()>={16:05:00} and TIME()<={16:10:00}
thisform.label2.Caption ="下午第四节课:4:15开始上课"
ENDCASE
程序代码:
thisform.Label1.caption=TIME() DO case CASE TIME()>={[color=#800000; font-weight: bold]8[/color]:[color=#800000; font-weight: bold]10[/color]:[color=#800000; font-weight: bold]00[/color]} and TIME()<={[color=#800000; font-weight: bold]8[/color]:[color=#800000; font-weight: bold]15[/color]:[color=#800000; font-weight: bold]00[/color]} thisform.label2.Caption ="上午第一节课:[color=#800000; font-weight: bold]8[/color]:20开始上课" CASE TIME()>={[color=#800000; font-weight: bold]9[/color]:[color=#800000; font-weight: bold]05[/color]:[color=#800000; font-weight: bold]00[/color]} and TIME()<={[color=#800000; font-weight: bold]9[/color]:[color=#800000; font-weight: bold]10[/color]:[color=#800000; font-weight: bold]00[/color]} thisform.label2.Caption ="上午第二节课:[color=#800000; font-weight: bold]9[/color]:15开始上课" CASE TIME()>={[color=#800000; font-weight: bold]10[/color]:[color=#800000; font-weight: bold]10[/color]:[color=#800000; font-weight: bold]00[/color]} and TIME()<={[color=#800000; font-weight: bold]10[/color]:[color=#800000; font-weight: bold]15[/color]:[color=#800000; font-weight: bold]00[/color]} thisform.label2.Caption ="上午第三节课:[color=#800000; font-weight: bold]10[/color]:20开始上课" CASE TIME()>={[color=#800000; font-weight: bold]11[/color]:[color=#800000; font-weight: bold]05[/color]:[color=#800000; font-weight: bold]00[/color]} and TIME()<={[color=#800000; font-weight: bold]11[/color]:[color=#800000; font-weight: bold]10[/color]:[color=#800000; font-weight: bold]00[/color]} thisform.label2.Caption ="上午第四节课:[color=#800000; font-weight: bold]11[/color]:15开始上课" CASE TIME()>={[color=#800000; font-weight: bold]13[/color]:[color=#800000; font-weight: bold]20[/color]:[color=#800000; font-weight: bold]00[/color]} and TIME()<={[color=#800000; font-weight: bold]13[/color]:[color=#800000; font-weight: bold]25[/color]:[color=#800000; font-weight: bold]00[/color]} thisform.label2.Caption ="下午第一节课:[color=#800000; font-weight: bold]1[/color]:30开始上课" CASE TIME()>={[color=#800000; font-weight: bold]14[/color]:[color=#800000; font-weight: bold]15[/color]:[color=#800000; font-weight: bold]00[/color]} and TIME()<={[color=#800000; font-weight: bold]14[/color]:[color=#800000; font-weight: bold]20[/color]:[color=#800000; font-weight: bold]00[/color]} thisform.label2.Caption ="下午第二节课:[color=#800000; font-weight: bold]2[/color]:25开始上课" CASE TIME()>={[color=#800000; font-weight: bold]15[/color]:[color=#800000; font-weight: bold]10[/color]:[color=#800000; font-weight: bold]00[/color]} and TIME()<={[color=#800000; font-weight: bold]15[/color]:[color=#800000; font-weight: bold]15[/color]:[color=#800000; font-weight: bold]00[/color]} thisform.label2.Caption ="下午第三节课:[color=#800000; font-weight: bold]3[/color]:20开始上课" CASE TIME()>={[color=#800000; font-weight: bold]16[/color]:[color=#800000; font-weight: bold]05[/color]:[color=#800000; font-weight: bold]00[/color]} and TIME()<={[color=#800000; font-weight: bold]16[/color]:[color=#800000; font-weight: bold]10[/color]:[color=#800000; font-weight: bold]00[/color]} thisform.label2.Caption ="下午第四节课:[color=#800000; font-weight: bold]4[/color]:15开始上课" ENDCASE
源代码和出错文件.rar
(13.32 KB)
时间常量设置出问题