public class Login : System.Windows.Forms.Form     这个语句是怎么建出来的啊~~~~~  我建的windows 窗体是 public class Login :Form  这样的啊~~~~~  这个是怎么回事啊~~~~~

解决方案 »

  1.   

    System.Windows.Forms.Form 与using System.Windows.Forms;.....Form等效...去看看 命名空间 的知识...http://msdn.microsoft.com/zh-cn/library/0d941h9d(VS.80).aspx
      

  2.   

    public class Login : System.Windows.Forms.Form手写的!
    自动生成的窗体代码,会using System.Windows.Forms
    所以只需要用Form,简写的名字。
     
      

  3.   

    如果你类前有using System.Windows.Form;
    那么
    public class Login : System.Windows.Forms.Form和public class Login : Form 是一样的,如果类前没有using System.Windows.Form;
    那么public class Login : Form 编译时会出错
      

  4.   

    加上using System.Windows.Form;就写成public class Login : Form 
    没有就写public class Login : System.Windows.Forms.Form
      

  5.   

    public class Login 继承 System.Windows.Forms.Form
      

  6.   

    之前的代码中如果有using System.Windows.Form;
    那么public class Login : System.Windows.Forms.Form 和 public class Login :Form 这两句代码是等效的,否则public class Login :Form 编译会报错。
      

  7.   

    @lz:
    如果您使用自建的Windows窗体的话,那么需要自己引入一个命名空间.如上所示.
    也可以参考大家的意见,使用using语句引入System.Windows.Forms.Form命名空间.
    所有窗体类都继承自该类型.
      

  8.   

    效果是一样的,
    前者指定的Form 是属于System.Windows.Forms命名空间下的.
    而System.Windows.Forms一般在程序的前几行就已经用 using 这种方式引用了.
      

  9.   

    System.Windows.Forms.Form 是从public class Login 中得以继承,是窗体加载事件(load)编译器自动生成的!
      

  10.   

    如果是手写的文件:
    1、事先没有引入命名空间System.Windows.Forms的话,就得写成public class Login : System.Windows.Forms.Form
    2、事先已经引入命名空间System.Windows.Forms.Form的话,可以简写成public class Login : Form,当然要是仍然写成public class Login : System.Windows.Forms.Form也没问题
    如果是在开发工具中新建的窗体:
    至少在vs2005中,自动生成的代码是这样的:public class Login : Form,系统已经引入了命名空间
      

  11.   

    using 引用了命名空间而已