jeudi 2 avril 2015

how to call timer.start() in a function different from form load in c#

this is my post on this site ... if (farmer(newstatus)) {



timer1.Start();

}


..... private void timer1_Tick(object sender, EventArgs e) {



if (sheepX < 0.7)
sheepX = sheepX + 0.08f;
if (boatX < 0.27)
boatX += 0.04f;

simpleOpenGlControl1.Invalidate();
}


.... private void Form1_Load(object sender, EventArgs e) { time1.start(); }


Aucun commentaire:

Enregistrer un commentaire