在vb.net中根据计时器显示消息

时间:2021-10-31 18:05:55

Suppose I have meeting 31/1/2011 9.30 and when current time becomes 31/1/2011 9.30 it displays a message: "You have a meeting". How can I do this with VB.NET?

假设我有一个会议31/ 2011年9月30日,当当前时间变成31/ 2011年9月30日时,它会显示一条信息:“你有一个会议”。我怎么用VB.NET做到这一点呢?

1 个解决方案

#1


1  

If you are doing this with the windows based project then add the timer in you form.

如果您正在使用基于windows的项目进行此操作,那么请在表单中添加计时器。

And set the fix time for the timer tick say 5 minutes or 10 minutes.

并设置定时器的固定时间为5分钟或10分钟。

Then in tick event check is there any event has to occur and display the message for that event.

然后在tick事件检查中是否需要发生任何事件并显示该事件的消息。

If you are doing this in Web based application.

如果您在基于Web的应用程序中这样做的话。

Then code for application_start in global.asax and create a new thred which check the event to occur at regular interval of time.

然后是application_start的全局代码。asax和创建一个新的thred,用于检查事件是否在正常的时间间隔内发生。

#1


1  

If you are doing this with the windows based project then add the timer in you form.

如果您正在使用基于windows的项目进行此操作,那么请在表单中添加计时器。

And set the fix time for the timer tick say 5 minutes or 10 minutes.

并设置定时器的固定时间为5分钟或10分钟。

Then in tick event check is there any event has to occur and display the message for that event.

然后在tick事件检查中是否需要发生任何事件并显示该事件的消息。

If you are doing this in Web based application.

如果您在基于Web的应用程序中这样做的话。

Then code for application_start in global.asax and create a new thred which check the event to occur at regular interval of time.

然后是application_start的全局代码。asax和创建一个新的thred,用于检查事件是否在正常的时间间隔内发生。