按顺序运行表格 [英] running forms in order

查看:78
本文介绍了按顺序运行表格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

如何在另一个内部运行表单?
这是我的代码,它的问题是在第一个表单之前运行的第二个表单

Hello,

How can I run form inside another?
This is my code, the problem in it is the second form run before the first one

private void Form1_Load(object sender, EventArgs e)
        {
            form2 f = new form2();
            f.ShowDialog();}

推荐答案

尝试使用Show方法:
Try the Show method instead:
form2 f = new form2();
f.Show();}


ShowDialog方法会暂停所有处理,直到关闭新窗体为止,第二个则不会-它将立即返回.


The ShowDialog method halts all processing until teh new form is closed, the second doesn''t - it returns immediately.


这篇关于按顺序运行表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆