问题描述
大家好
i我正在使用一段代码
form1的对象类/表格没有出现请帮助在time_elapsed body中显示它
我尝试了什么:
无效MainWindow_Loaded(对象发送者,RoutedEventArgs e)
{
timer = new Timer() ;
timer.Interval = 1000;
timer.Elapsed + = timer_Elapsed;
timer.Start( );
}
void timer_Elapsed(对象发送者,ElapsedEventArgs e)
{
form1 object = new form1 ();
object.Show()
}
hi everyone
i am using a piece of code as under
the object of the form1 class/form doesn't appears please help to display it within the time_elapsed body
What I have tried:
void MainWindow_Loaded(object sender, RoutedEventArgs e)
{
timer = new Timer();
timer.Interval = 1000;
timer.Elapsed += timer_Elapsed;
timer.Start();
}
void timer_Elapsed(object sender, ElapsedEventArgs e)
{
form1 object = new form1();
object.Show()
}
这篇关于当show()方法调用时,我的对象没有显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!