问题描述
我正在创建Windows应用程序。
我在usercontrol上添加了菜单控件,我添加了该控件我的其他形式。
现在我想要的是,从我的菜单中选择新表格时,它应隐藏或关闭优先打开的窗口然后它应该显示我下一步窗口。
但是来自菜单点击事件的用户控件的this.hide不起作用
我尝试过:
private void newToolStripMenuItem_Click(object sender,EventArgs e)
{
CallDetailsForm frmCalls = new CallDetailsForm();
frmCalls.Show();
this.Hide();
}
Hi ,
I am creating windows application.
where I have added menu control on usercontrol and i have added that control on my other forms.
Now what i want is , from my menu when i select new form , it should hide or close previosuly open window and then it should show me next window.
But this.hide from user control on menus click event is not working
What I have tried:
private void newToolStripMenuItem_Click(object sender, EventArgs e)
{
CallDetailsForm frmCalls = new CallDetailsForm();
frmCalls.Show();
this.Hide();
}
推荐答案
这篇关于如何在导航到新建之前隐藏用户控件的当前窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!