计时器启动时并行调用timer_tick事件 [英] calling timer_tick event parallely when the timer starts

查看:248
本文介绍了计时器启动时并行调用timer_tick事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



计时器控件启动时如何并行调用timer_tick事件.

这是Windows应用程序(c#.3.0).

问候,
nagaraju.n

Hi,

How can i call the timer_tick event parallely when the timer control starts.

This is windows application(c#.3.0).

Regards,
nagaraju.n

推荐答案

您不应该手动调用计时器滴答事件.您可以做的是将滴答事件处理程序中当前的代码放入其自己的方法中,然后可以从计时器滴答事件处理程序中以及该窗体中的其他任何地方"调用该方法.

我就是那样做的.

You''re not supposed to call the timer tick event manually. What you *could* do is put the code in that''s currently in the tick event handler into it''s own method, and then you can call that method from the timer tick event handler and *anywhere* else in your form.

That''s the way I''d do it.


这篇关于计时器启动时并行调用timer_tick事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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