vb.net计时器

编程入门 行业动态 更新时间:2024-10-10 17:33:00
本文介绍了vb计时器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

)我想要构建 2应用程序与vb和c#(分离)

我有1个camrera(一个videocapx)我使用videocapx activex进行相机通信,我需要每秒(或更少)间隔

做快照并与之前的快照进行比较。喜欢运动,但间隔时间不是每一帧。

和其他计时器只计算时间并连接到IO卡,

2个计时器必须一起开始和结束并分享几个变量。

我的问题:

怎么做?只有2个的定时器或者使用其他?

我需要线程吗?

谢谢

Eli

解决方案

根本不要使用计时器......

只需运行一个带循环的后台线程并监控循环执行时间。然后,您可以使用两个单独的计数器变量来跟踪运行时间,并在每个变量达到指定阈值时执行每个过程。

)I want build 2applications with vb and c# (seperated)

I have 1 camrera (one videocapx) i iuse videocapx activex for camera communication and i need each second(or less) interval

to do snapshot and to compare with the one before. like motion but in interval time not each frame.

and other timer just count time and connect to IO card,

the 2 timers must start and end together and share few varibles.

my questions:

how to do it? just 2 timers of or use other?

do i need threads?

Thanks

Eli

解决方案

Don't use timers at all...

Just run one background thread with a loop and monitor the loop execution time. You can then use two separate counter variables to keep track of run time and perform each process when each variable reaches the specified threshold.

更多推荐

vb.net计时器

本文发布于:2023-11-06 08:43:17,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1563213.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:计时器   vb   net

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!