So, here's my problem atm:

I've declared the timer as a class member

private int numSS;        
private System.Windows.Forms.Timer timer1;

I've initialized the Timer in the constructor:

timer1 = new System.Windows.Forms.Timer();            
timer1.Tick += new System.EventHandler(timer1_Tick);            
timer1.Interval = 1000;

A Method of mine starts the timer

public void InGameCrowdScreenshots(int numScreenshots)        
{            
        timer1.Enabled = true;            
        while(numSS <= numScreenshots)            
        {            }            
        print("Complete");        
}

and here's the onTick

private void timer1_Tick(object sender, System.EventArgs e)        
{            
      if(sender == timer1)            
      {                
             TakeConsoleScreenShot();                
             numSS++;                
             if(numSS >= 10)                    
             timer1.Stop();            
       }        
}

When stepping through in debug, timer1_Tick is never called. The while loop is going forever obviously because 0 is < whatever number is passed into it. But, i was under the impression the timertick was on a separate thread, runnning in the background for me.

figured it out,

was using forms.timer instead of system.timer

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.