多个TIMER是没有问题的,可能是你TIMER内的代码运算量比较大,可以试试在方法里面加上若干个DOEVENTS()
如果有多个TIMER,应该用线程效率更高一点,TIMER的效率不好

解决方案 »

  1.   

    可以的。我做了个DEMOusing System;
    using System.Drawing;
    using System.Collections;
    using System.ComponentModel;
    using System.Windows.Forms;namespace Sample
    {
    /// <summary>
    /// frmMultiTimer 的摘要说明。
    /// </summary>
    public class frmMultiTimer : System.Windows.Forms.Form
    {
    private System.Windows.Forms.Label lblTimer1;
    private System.Windows.Forms.Label lblTimer2;
    private System.ComponentModel.IContainer components = null; public frmMultiTimer()
    {
    //
    // Windows 窗体设计器支持所必需的
    //
    InitializeComponent(); //
    // TODO: 在 InitializeComponent 调用后添加任何构造函数代码
    //
    } /// <summary>
    /// 清理所有正在使用的资源。
    /// </summary>
    protected override void Dispose( bool disposing )
    {
    if( disposing )
    {
    if(components != null)
    {
    components.Dispose();
    }
    }
    base.Dispose( disposing );
    } #region Windows 窗体设计器生成的代码
    /// <summary>
    /// 设计器支持所需的方法 - 不要使用代码编辑器修改
    /// 此方法的内容。
    /// </summary>
    private void InitializeComponent()
    {
    this.lblTimer1 = new System.Windows.Forms.Label();
    this.lblTimer2 = new System.Windows.Forms.Label();
    this.SuspendLayout();
    // 
    // lblTimer1
    // 
    this.lblTimer1.Location = new System.Drawing.Point(32, 24);
    this.lblTimer1.Name = "lblTimer1";
    this.lblTimer1.TabIndex = 0;
    this.lblTimer1.Text = "0";
    this.lblTimer1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
    // 
    // lblTimer2
    // 
    this.lblTimer2.Location = new System.Drawing.Point(32, 72);
    this.lblTimer2.Name = "lblTimer2";
    this.lblTimer2.TabIndex = 1;
    this.lblTimer2.Text = "0";
    this.lblTimer2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
    // 
    // frmMultiTimer
    // 
    this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
    this.ClientSize = new System.Drawing.Size(292, 149);
    this.Controls.Add(this.lblTimer2);
    this.Controls.Add(this.lblTimer1);
    this.Name = "frmMultiTimer";
    this.Text = "frmMultiTimer";
    this.Load += new System.EventHandler(this.frmMultiTimer_Load);
    this.ResumeLayout(false); }
    #endregion
    private Timer pTimer1 = new Timer();
    private Timer pTimer2 = new Timer();
    private void frmMultiTimer_Load(object sender, System.EventArgs e)
    {
    pTimer1.Interval = 200;
    pTimer1.Tick += new EventHandler(pTimer_Tick);
    pTimer1.Enabled = true; pTimer2.Interval = 400;
    pTimer2.Tick += new EventHandler(pTimer_Tick);
    pTimer2.Enabled = true;
    }
    private void pTimer_Tick(object sender, System.EventArgs e)
    {
    if(((Timer)sender == pTimer1))
    {
    lblTimer1.Text = Convert.ToString(Convert.ToInt32(lblTimer1.Text) + 1);
    }
    else
    {
    lblTimer2.Text = Convert.ToString(Convert.ToInt32(lblTimer2.Text) + 1);
    }
    }
    }
    }
      

  2.   

    可以同时使用,我试过的。肯定是你的程序不对。不要在每个Timer_tick里干很多事情