我需要超过1分钟的计时器间隔。 [英] i need timer interval more than 1 Minute.

查看:237
本文介绍了我需要超过1分钟的计时器间隔。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



i我正在使用计时器控制,它很好但是如果我的事件少于一次

在1分钟内。

i想要制作每5分钟一次,我怎么做?


i我正在使用VB6,VB.NET


-

最好的问候


Tark M. Siala

开发经理

国际计算机中心(ICC.Networking)

手机:+ 218-91-3125900

电子邮箱: ta ** *****@icc-libya.com

Messenger: ta *** **** @ hotmail.com

网页: http://www.icc-libya.com

博客: http://spaces.msn.com/tarksiala

======================= ===============

解决方案

您可以指定间隔您的计时器在表单加载到某个值时。

例如如果您的计时器是Timer1,那么表单加载时

: -

Timer1.Enabled = True

Timer1.Interval = 300000(5分钟)


这将激活Timer1_Elapsed事件,你可以在那里进行

处理。


-S

在VB.net中的

(不确定6 ...)


a计时器,间隔1000 = 1000ms = 1 s


所以1分钟60 * 1000 = 60,000


所以5分钟60 * 5000 = 300,000


" Tark Siala" < TA ******* @ icc-libya.com>在消息中写道

新闻:eQ ************* @ TK2MSFTNGP02.phx.gbl ...

hi
我我正在使用计时器控制,它很好,但如果我的活动在1分钟内完成不到一次的时间。
我想每5分钟制作一次活动,我该怎么做?

我正在使用VB6,VB.NET

- 最好的问候

Tark M. Siala
开发经理
INTERNATIONAL COMPUTER CENTER( ICC.Networking)
手机:+ 218-91-3125900
电子邮箱: ta ** *****@icc-libya.com
Messenger: ta ******* @ hotmail.com
网页: http://www.icc -libya.com
博客: http://spaces.msn。 com / tarksiala
====================================== / blockquote>


" Jason&q UOT; < JA *** @ genzlinger.com>写在消息中

新闻:%2 **************** @ TK2MSFTNGP03.phx.gbl

在VB.net中(不确定6 ...)

一个间隔1000 = 1000ms的计时器= 1秒

所以1分钟60 * 1000 = 60,000

所以5分钟60 * 5000 = 300,000




在VB6中,定时器控制限制为65535所以通常的方法是

将时间保存在模块级或静态过程级变量中,将

计时器设置为60000(或任何值> 0和<65536)然后当计时器事件

fires比较Now节省时间以确定您是否已达到

所需的间隔。


-

回复群组以便所有可以参加

VB.Net:愚弄我一次......


hi
i am using timer control, its good but if my event doing less than one time
in 1 Minute.
i want make event every 5 minute, how i can do that?

i am using VB6, VB.NET

--
Best Regards

Tark M. Siala
Development Manager
INTERNATIONAL COMPUTER CENTER (ICC.Networking)
Mobile: +218-91-3125900
E-Mail: ta*******@icc-libya.com
Messenger: ta*******@hotmail.com
Web Page: http://www.icc-libya.com
Blog: http://spaces.msn.com/tarksiala
======================================

解决方案

You can assign the interval of your timer on form load to some value.
e.g. if your timer is Timer1, then
on form load :-
Timer1.Enabled = True
Timer1.Interval = 300000 ( 5 minutes)

This will fire the Timer1_Elapsed event where you can do your
processing.

-S


in VB.net (not sure about 6...)

a timer with the interval of 1000 = 1000ms which = 1 s

so for 1 minute 60 * 1000 = 60,000

so for 5 minutes 60 * 5000 = 300,000

"Tark Siala" <ta*******@icc-libya.com> wrote in message
news:eQ*************@TK2MSFTNGP02.phx.gbl...

hi
i am using timer control, its good but if my event doing less than one
time in 1 Minute.
i want make event every 5 minute, how i can do that?

i am using VB6, VB.NET

--
Best Regards

Tark M. Siala
Development Manager
INTERNATIONAL COMPUTER CENTER (ICC.Networking)
Mobile: +218-91-3125900
E-Mail: ta*******@icc-libya.com
Messenger: ta*******@hotmail.com
Web Page: http://www.icc-libya.com
Blog: http://spaces.msn.com/tarksiala
======================================



"Jason" <ja***@genzlinger.com> wrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl

in VB.net (not sure about 6...)

a timer with the interval of 1000 = 1000ms which = 1 s

so for 1 minute 60 * 1000 = 60,000

so for 5 minutes 60 * 5000 = 300,000



In VB6 the timer control is limited to 65535 so the usual method there is to
save the time ina module-level or static procedure level variable, set the
timer to 60000 (or any value >0 and <65536) and then when the timer event
fires compare "Now" to the saved time to determine if you have reached the
desired interval.

--
Reply to the group so all can participate
VB.Net: "Fool me once..."


这篇关于我需要超过1分钟的计时器间隔。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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