Hello:
I have this code. Is theApplication.OpenForms to much overhead for the program?
((FormICEPack)Application.OpenForms["FormICEPack"]).textBoxLoginUser_ID.Text = textBoxUser_ID.Text;
((FormICEPack)Application.OpenForms["FormICEPack"]).textBoxLoginPassword.Text = textBoxPassword.Text;
((FormICEPack)Application.OpenForms["FormICEPack"]).textBoxLoginProfile_ID.Text = textBoxProfileLogin_ID.Text;
((FormICEPack)Application.OpenForms["FormICEPack"]).textBoxLoginProfileServer.Text = textBoxProfileServer.Text;
((FormICEPack)Application.OpenForms["FormICEPack"]).textBoxLoginProfileServerType.Text = textBoxProfileServerType.Text;
((FormICEPack)Application.OpenForms["FormICEPack"]).textBoxLoginProfileLogin_ID.Text = textBoxProfileLogin_ID.Text;
((FormICEPack)Application.OpenForms["FormICEPack"]).textBoxLoginProfilePassword.Text = textBoxProfilePassword.Text;
((FormICEPack)Application.OpenForms["FormICEPack"]).textBoxLoginProfileDatabase.Text = textBoxProfileDatabase.Text;
Loading
NainilPosted Mar 5, 2010, 3:30 PM
The more forms you open within a single application, the more memory your application is going to use. However from the above code it looks like you only have 1 instance of FormICEPack form opened and accessing that Form instance using the code above should not be too much overhead. Hope this helps.
theLizardPosted Mar 6, 2010, 3:44 PM
This is why I said that forms management is important in MDI applications so hope that you revisit the zip I uploaded for one of your questions.
theLizardPosted Mar 6, 2010, 3:43 PM
This is why I said that forms management is important in MDI applications so hope that you revisit the zip I uploaded for one of your questions.
GustavoPosted Mar 6, 2010, 3:17 AM
Thanks that is what I was looking for, the whole time:
This way I can define the form at load time and then use it any time I want.... Thanks.
Sam HobbsPosted Mar 6, 2010, 12:45 AM