如何在Visual Studio 2010中将用户控件添加到Windows窗体应用程序?
问题描述:
如何在Visual Studio 2010中向Windows窗体应用程序添加用户控件?
How do I add a user control to a Windows Forms application in Visual Studio 2010?
答
添加到什么?只需创建一个用户控件。添加它与任何其他控件没有什么不同。我假设您知道如何添加任何其他控件,因为在尝试使用某些可用控件之前,您不太可能从用户控件启动。你更有可能,并且刚开始尝试用户控件,所以你可能对添加它有疑问。所以,不要怀疑,甚至不用担心它:它会被添加到工具箱中而不需要你的任何努力,你可以像你原来那样将它添加到表单或其他控件中。 />-SA
Add to what? Just create a user control. Adding it is no different from any other controls. I assume you know how to add any other control, because it's very unlikely that you started from a user control before you tried to use some available controls. It's more likely that you did, and just started to try a user control, so you might have a doubt about adding it. So, don't doubt, don't even worry about it: it will be added to the toolbox without any efforts from your side, and you can add it to your forms or other controls the same way as you already did.—SA