在我的应用程序第一次运行时,打开了两个表单。最顶端的表单需要优先考虑,并且不允许与背景中的表单进行任何交互。我试过ShowDialog()
作为here,但是这隐藏了我不想做的背景中的表单。有没有完成这个的方法?禁止与背景表单互动
public Form1()
{
InitializeComponent();
if (!fileexists(@"c:\Management Tools\Absence Tracker\bin\data\tbase.skf"))
{ firstrunactions(); }
}
void firstrunactions()
{
//open the get-started form and invite user to populate serialisable objects
firstrun frwindow = new firstrun();
frwindow.ShowDialog();
}
ShowDialog()不会“隐藏”表单。邮政编码。并使用Enabled属性禁用交互。 –
它不会隐藏表格,但是在这里使用它会导致我的主表单不显示。 – Wolfish