1

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,

4

3 回答 3

0

查看 SetWindowParent Windows API 调用,不,您不能使用 .Parent 它无法正常工作,因为 .NET 本身在内部不支持您想要做的事情。

于 2009-11-06T04:30:34.773 回答
0

为什么不能在 UserControl 而不是 Form 中托管内容的任何特殊原因?

于 2009-06-24T18:22:31.077 回答
0

将子窗体作为拥有的窗体添加到 MDI 父窗体怎么样?

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

于 2009-07-16T14:36:05.760 回答