Cancel form load

后端 未结 6 1396
猫巷女王i
猫巷女王i 2021-01-14 01:15

I have the following code :

This call the second form

private void updateToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Up         


        
6条回答
  •  半阙折子戏
    2021-01-14 01:51

    You should probably do whatever check you're performing before you choose to open the form in the first place.

    So something like:

    if(funct() == "1")
    {
        var form = new Form();
        form.ShowDialog();
    }
    

提交回复
热议问题