在Delphi 5中将最多2小时添加到DateTimePicker(正时) [英] Add a Max of 2 Hours to DateTimePicker (Just Time) in Delphi 5

查看:66
本文介绍了在Delphi 5中将最多2小时添加到DateTimePicker(正时)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好.
我需要设置一个最大值第一次选择后的2小时内,这是在Delphi 5中.
这就是我的意思:
我设置了两个日期时间选择器以仅显示时间,当我在第一个中选择一个时间时,我需要限制显示第二个时间,或者选择仅在第二个之后的两个小时(例如,如果在第一个中我选择9:00 AM,第二个只是让我选择[或自动选择] 11:00 AM)
预先感谢您的回答.

更新
我找到了解决方案...非常简单...
对于任何关心它的人:

tmrEnd.Time:= tmrEntry.Time + EncodeTime(2,0,0,0);

Hi to all.
I need to set a max. of 2 hours after a first selection, this in Delphi 5.
This is what I mean:
I have two date-time-pickers set to show only the time, when I select a Time in the first one I need to limit the second to show or to select just 2 hours after the first (Ex. If in the first one I choose 9:00 AM, the second is just going to let me select [or select automatically] the 11:00 AM)
Thanks in advance for your answers.

UPDATE
I found the solution...it was so easy...
To anyone who cares about it:

tmrEnd.Time:=tmrEntry.Time+ EncodeTime(2,0,0,0);

推荐答案

将其从未答复的列表中删除.

OP找到了解决方案并进行了更新:
我找到了解决方案...太简单了...
对于任何关心它的人:

To put it out of unanswered list.

OP found the solution and updated:
I found the solution...it was so easy...
To anyone who cares about it:

tmrEnd.Time:=tmrEntry.Time+ EncodeTime(2,0,0,0); 


这篇关于在Delphi 5中将最多2小时添加到DateTimePicker(正时)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆