B
Baliga, Narasimha
Hi,
I am trying to write an app which will have say a MainForm that has a
TreeView and a Panel control on it. The project also has 2 other forms.
Now the TreeView would have 2 nodes and on each node click one of the 2
forms will be created (if not created before) and is shown embedded in the
main form inside the panel.
So I have code like this
if (frmScheduler == null)
{
frmScheduler = new SchedulerFrm();
//frmScheduler.Owner = this;
frmScheduler.FormBorderStyle = FormBorderStyle.None;
}
frmScheduler.TopLevel = false;
frmScheduler.Parent = panelControl1;
frmScheduler.Show();
My question is that would this be the best way of acheiving it? The above
code is for say Form1, I will have similar code for Form2. Object pointer
variable that holds the form object would be defined under the MainFrm. I
need to hide the form1 when Form2 is being shown.
regards
Baliga
I am trying to write an app which will have say a MainForm that has a
TreeView and a Panel control on it. The project also has 2 other forms.
Now the TreeView would have 2 nodes and on each node click one of the 2
forms will be created (if not created before) and is shown embedded in the
main form inside the panel.
So I have code like this
if (frmScheduler == null)
{
frmScheduler = new SchedulerFrm();
//frmScheduler.Owner = this;
frmScheduler.FormBorderStyle = FormBorderStyle.None;
}
frmScheduler.TopLevel = false;
frmScheduler.Parent = panelControl1;
frmScheduler.Show();
My question is that would this be the best way of acheiving it? The above
code is for say Form1, I will have similar code for Form2. Object pointer
variable that holds the form object would be defined under the MainFrm. I
need to hide the form1 when Form2 is being shown.
regards
Baliga