问题描述
我有三种形式,当我点击设置表单时,第二种形式的
,设置表格将被打开。如果在设置表单中进行了任何更改,并在保存设置后,将关闭设置表单,并且应关闭第二个表单并打开第一个表单。
如果在设置中没有进行任何更改,只需点击关闭设置表单即可关闭...
如果有任何更改并点击保存按钮,那么只有两个设置(form3)和form2应该关闭..
你能帮忙吗...
i had three forms,
in second form when i click on settings form, settings form will be opened. if any changes are made in the settings form and after saving the settings, settings form will be closed and second form also should be closed and first form should be opened.
if no changes are done in settings and simply click on close settings form will be closed...
if any changes are made and click on save button then only both the settings(form3) and form2 should be closed..
can you please help in this..
推荐答案
private void Form1_FormClosing(object sender, FormClosingEventArgs e) {
if (string.Equals((sender as Button).Name, @"CloseButton"))
// Do something proper to CloseButton.
else
// Then assume that X has been clicked and act accordingly.
}
来源:]
3.结账表格和开标表格。
完成。
Source : Click Here[^]
3. Closing form and opening form.
Done.
这篇关于在此表单关闭时打开此表单和上一个表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!