I have a main form application which is an MDI container. A user can press a button to make a new form pop up (not as an MDI child), and then from this new form that popped up, I want to be able to have a button that creates a different form as an MDI child.
In the main form I have:
ResSelectForm resSelectForm = new ResSelectForm();
resSelectForm.Show();
So in the resSelect
form that popped up, when the user presses an OK button, I have:
ImageForm imageForm = new ImageForm();
imageForm.MdiParent = Mainform; // doesn't work
imageForm.Show();
I get the following error:
Error CS0119 'MainForm' is a type, which is not valid in the given context