That's a silly thing to do, even if your code compiled - which it won't. It's missing a semicolon, and you can't call a variable
object
for the same reasons you can't call it
float
or
string
.
So the chances are that if you fix them, it'll work - it does for me - and it doesn't seem to work for you because it doesn't compile so the "running version" doesn't have that code in it.
System.Timers.Timer timer = new System.Timers.Timer();
timer.Interval = 1000;
timer.Elapsed += timer_Elapsed;
timer.Start();
}
void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
Form1 f1 = new Form1();
f1.Show();
}
But that's not nice - it'll open a new form every second ... which will fill the screen pretty quickly.