Hi,
I have a windows application, which has a main form and on top of it i have a modal form. i want to minimize both the forms at one shot.
Can anyone provide me details on doing the same.
Thanks
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Mike GoldPosted Mar 26, 2007, 2:53 PM
In .NET, if you are using windows forms, The main form should automatically minimize when you launch the modal dialog (using ShowDialog) and choose minimize. Below is my test code where TestDialog is simply another Windows Form.
-Mike
namespace TestModal2
{
public partial class Form1 : Form{
public Form1(){
InitializeComponent();}
private void button1_Click(object sender, EventArgs e){
TestDialog dlg = new TestDialog(); dlg.ShowDialog();}
}
}