views:

160

answers:

3

I want to make a form contained in another form. The problem is the application is already a MDI, and you can't nest MDI's. If I do childFrm.Parent = parentForm some controls behave oddly. For example, if you click on the text in the textbox, usually the text cursor appears where you clicked, but it doesn't, it just goes to the end of the text.

Any suggestions?

Thanks,

A: 

Any particular reason why you can't host the content in a UserControl instead of a Form?

micahtan
I need the look/feel/functionality of a form. We are replacing a vb6 app and need to keep same look.
OR1614
A: 

How about adding the child forms as owned forms to the MDI parent?

http://msdn.microsoft.com/en-us/library/system.windows.forms.form.addownedform.aspx

Jacob Ewald
A: 

Look at SetWindowParent Windows API Call, and no you cannot use .Parent it won't work correctly as .NET itself doesn't support internally what you're wanting to do.

Shaun Wilson