Top-level control cannot be added to a control?

  • Thread starter Thread starter Bruce
  • Start date Start date
B

Bruce

I am starting my first C## project. In one of my menu events I have the
following:

UserProfile winProfile = new UserProfile();
winProfile.Parent = this;
winProfile.Show();


UserProfile is a form, this is a MDI form.

When I do this, I get the error:

Top-level control cannot be added to a control

I also tried:

UserProfile winProfile = new UserProfile();
winProfile.Show(this);


Which shows user profile but not within the parent.


I did a search on this error butdid not find anything that applies.


What am I doing wrong?
 
Back
Top