2005中表单的链接

2005中表单的链接

本文介绍了Visual Studio C ++ 2005中表单的链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

i hav 2通过位于form1中的按钮从form1调用Form2,从而形成Form1和Form2.i.使用下面的代码form2将打开,但是form1仍然可见.


Form2().ShowDialog();
Form2().Activate();
Form1().Close();

我只希望可见form2.当form2处于活动状态时如何隐藏form1?pls help ..

-------------------------------------------------- ------------------------

@Mohammad Elsheimy如果我包含Form2().Show()而不是Form2().ShowDialog()form1打开,但是form2打开jus占一秒.我希望当我运行我的应用程序时,form2应该在我单击到一个菜单时打开

解决方案


i hav 2 forms Form1 n Form2.i called form2 from the form1 thru a button which is in form1. Using the following code form2 opens but form1 is still visible.


Form2().ShowDialog();
Form2().Activate();
Form1().Close();

i want only form2 to be visible .how can i hide form1 when form2 is active?pls help..

--------------------------------------------------------------------------

@Mohammad Elsheimy if i include Form2().Show() instead of Form2().ShowDialog()form1 opens but form2 opens jus for a fraction of second.i want that when i run my application form2 should open when i click to a button in form1 and form1 should be invisible.

解决方案


这篇关于Visual Studio C ++ 2005中表单的链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 01:18