Original post: How to access a timer from another class in C#
I tried everything.
-Event
-Invoke can\'t be done,because Timers don\'
I accidently tried to use invoke again,this time it worked,but I'll accept your answer,DavidM.
public bool TimerEnable
{
set
{
this.Invoke((MethodInvoker)delegate
{
this.timer.Enabled = value;
});
}
}
public static void timerEnable()
{
var form = Form.ActiveForm as Form1;
if (form != null)
form.TimerEnable = true;
}