| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 775 人关注过本帖
标题:我想做一个提示时间的软件,怎么处理时间比较
取消只看楼主 加入收藏
herogood
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2010-4-12
结帖率:0
收藏
已结贴  问题点数:20 回复次数:0 
我想做一个提示时间的软件,怎么处理时间比较
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)

时间常量设置出问题
搜索更多相关主题的帖子: 时间 提示 软件 
2010-04-12 19:52
快速回复:我想做一个提示时间的软件,怎么处理时间比较
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.050942 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved