what is the relationship between those projects? you need to add project dependency, also note, you need to specify a namespace, if they are different but if your control library project needs that Form1 class, consider to move that class into the control library project, since normally, it is a bad idea to add a project dependency on a 应用程序工程

解决方案 »

  1.   

    一般来说,Windows Control Labrary工程应该是独立的,不应该对应用程序有依赖在Windows Control Labrary工程中定义一个新的窗体类MyForm,把ConnForm需要使用的Form1中的东西搬进去,把ConnForm中的私有字段f1变成是MyForm的应用程序工程中,添加对Windows Control Labrary工程加引用,然后,把你的窗体类Form1的基类改成MyForm