开发者

c# opening of a form [closed]

开发者 https://www.devze.com 2023-01-08 14:18 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 12 years ago.

How do I prevent multiple form opens

FormTanımlama frmTanimlama = new FormTanımlama();
FormRapor frmRapor = new FormRapor();

frmTanimlama.Close();
frmRapor.Close();

FormIslem frmIslem = new FormIslem();
frmIslem.MdiParent = this;
frmIslem.Show(); 

Other forms doesn't clos开发者_如何学运维e When I open a new form


You are going to need to give more details to get a more detailed answer.

But the simple answer is, your program should have an understanding of how your program functions. You will need to make some form of flag or structure that keeps track of what you have open so you can decide if other forms can be opened. You should be doing this check before the new Form() call so that you don't do all the initialization steps of the form when you are going to just reject it and not retain a reference to it.

0

精彩评论

暂无评论...
验证码 换一张
取 消