我正在开发一个继承自 Form 类的类库,然后在 Gui 应用程序中显示此表单。现在我需要将类库更改为UserControl
.
如何在另一个项目的表单中显示它? 提前感谢您的建议。
IFaceForm 是 InterfaceLibrary 内部的用户控件。
using InterfaceLibrary;
namespace MxlInterface
{
public partial class IFaceConn : Form
{
iFaceForm Interface = new iFaceForm();
//size of the parent form is 881,514
//use these variables to change the position of the "Interface Form"
int xlocation = 0;
int ylocation = 0;
public IFaceConn()
{
InitializeComponent();
//Interface.StartPosition = FormStartPosition.Manual;
Interface.Location = new Point(xlocation, ylocation);
//Interface.MdiParent = this;
Interface.Show();
}
}
}