Hi all
I have a TreeView in a MDI Apps. When the Nodes is selected it displays a MDI child form.
I want to use a switch statement to determine which node is selected and to load or show the correct MDI child form.
Here is part of the code:
private void treeViewMDI_Aft erSelected (object sender, TreeViewEvenArg s e)
{
frmAB frmAB1 = new frmAB ();
frmUDC frmUDC1 = new frmUDC();
switch(e.Node.T ext)
{
case frmAB1.Text: // This did not compile
frmAB1.MDIParen t=this;
frmAB1.show();
break;
case frmUDC1.Text: //This did not compile
frmUDC1.MDIPare nt=this;
frmUDC1.show();
break;
}
}
The line of code that did not compile is stated above.
Please assist or point me to right direction to solve this problem.
Marsh
I have a TreeView in a MDI Apps. When the Nodes is selected it displays a MDI child form.
I want to use a switch statement to determine which node is selected and to load or show the correct MDI child form.
Here is part of the code:
private void treeViewMDI_Aft erSelected (object sender, TreeViewEvenArg s e)
{
frmAB frmAB1 = new frmAB ();
frmUDC frmUDC1 = new frmUDC();
switch(e.Node.T ext)
{
case frmAB1.Text: // This did not compile
frmAB1.MDIParen t=this;
frmAB1.show();
break;
case frmUDC1.Text: //This did not compile
frmUDC1.MDIPare nt=this;
frmUDC1.show();
break;
}
}
The line of code that did not compile is stated above.
Please assist or point me to right direction to solve this problem.
Marsh
Comment