c# - C# 中的 Timer_tick

标签 c#

如何设置我的计时器以秒为单位?当我使用工具箱中的计时器时,它会在没有任何更改的情况下开始使用另一个时间单位。
如果您能给我任何帮助,我将不胜感激。

我有这样的东西:

t = 0; 
timer1.Start(); 
if (t == 600) 
    timer1.Stop(); 

最佳答案

编辑 使用 timer.interval = 1000 * n;,其中 n 是滴答之间的秒数。

关于c# - C# 中的 Timer_tick,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10123712/

相关文章:

c# - 如果形状的高度大于表单的高度,则显示滚动条

C# 互操作 : bad interaction between fixed and MarshalAs

c# - 在c#中解析c/c++/c#文件

c# - "SqlConnection does not support parallel transactions"什么时候发生?

c# - 将带有 double 的 C 结构编码到 C# - 正值错误

c# - Windows Azure 找不到 C++/CLI 项目的 DLL

c# - 删除 Windows 窗体中 tablelayoutpanel 中单元格之间的间距?

c# - Xamarin/Mono Mac - AppStore 构建中的握手失败

c# - 哪些 C# 编译器错误未记录?

c# - 我如何初始化 DataSpace.SSpace 和 DataSpace.CSpace?