CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
可用分押宝游戏火热进行中... 专题改版:Java Web 专题
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  .NET技术 >  C#

下面程序错误提示“未定义程序入口点”,我是个菜鸟,别笑我

楼主panda0379(panda)2004-05-02 14:38:41 在 .NET技术 / C# 提问

using   System;  
  using   System.Drawing;  
  using   System.Collections;  
  using   System.ComponentModel;  
  using   System.Windows.Forms;  
   
  namespace   WindowsApplication2  
  {  
  ///   <summary>  
  ///   Form1   的摘要说明。  
  ///   </summary>  
  public   class   Form1   :   System.Windows.Forms.Form  
  {  
  ///   <summary>  
  ///   必需的设计器变量。  
  ///   </summary>  
  private   System.ComponentModel.Container   components   =   null;  
   
  public   Form1()  
  {  
  //  
  //   Windows   窗体设计器支持所必需的  
  //  
  InitializeComponent();  
   
  //  
  //   TODO:   在   InitializeComponent   调用后添加任何构造函数代码  
  //  
  this.Text   ="hello   world";  
  }  
   
  ///   <summary>  
  ///   清理所有正在使用的资源。  
  ///   </summary>  
  protected   override   void   Dispose(   bool   disposing   )  
  {  
  if(   disposing   )  
  {  
  if(components   !=   null)  
  {  
  components.Dispose();  
  }  
  }  
  base.Dispose(   disposing   );  
  }  
   
  #region   Windows   窗体设计器生成的代码  
  ///   <summary>  
  ///   设计器支持所需的方法   -   不要使用代码编辑器修改  
  ///   此方法的内容。  
  ///   </summary>  
  private   void   InitializeComponent()  
  {  
  //    
  //   Form1  
  //    
  this.AutoScaleBaseSize   =   new   System.Drawing.Size(6,   14);  
  this.ClientSize   =   new   System.Drawing.Size(292,   273);  
  this.Name   =   "Form1";  
  this.Text   =   "Form1";  
  this.Load   +=   new   System.EventHandler(this.Form1_Load);  
   
  }  
  #endregion  
   
  private   void   Form1_Load(object   sender,   System.EventArgs   e)  
  {  
   
  }  
  }  
  } 问题点数:20、回复次数:3Top

1 楼kwklover(随风)回复于 2004-05-02 14:48:12 得分 10

///   <summary>  
  ///   应用程序的主入口点。  
  ///   </summary>  
  [STAThread]  
  static   void   Main()    
  {  
  Application.Run(new   Form1());  
  }  
  加上上面这端,但一个应用程序只能有一个入口点,就是只有一个窗体有上面那一端代码  
   
  一般新添加的窗体是没有上面那一段代码的,自己加上吧  
  Top

2 楼q7a(wy)回复于 2004-05-02 14:56:19 得分 5

主要原因是没有主函数即main函数Top

3 楼chenyuming2004(这辈子我算是废了)回复于 2004-05-02 15:09:35 得分 5

少了Main函数,  
  把  
    kwklover(随风)    
  的那段代码粘贴进去就可以了。Top

相关问题

  • 未定义入口点,编译错误
  • 何会提示field未定义?
  • dbgrideh导入excel提示TDBGridEhExportClass未定义
  • 请问:我在vs2003中创建了一个c#空的windows应用程序,没做任何改动,为什么提示e:\...\debug\a.exe未定义入口?
  • 编译时VC6居然提示基类"CListView"未定义?MFC的基类啊,怎么会未定义?
  • 什么是未定义入口点?怎么解决?
  • “程序未定义入口点”是指什么错误?谢谢!
  • [未定义入口点]是什么意思呀?
  • 未定义入口点!初学者,高手请指教.
  • 新手真难啊!为什么总提示变量未定义?

关键词

  • 代码
  • 窗体
  • 入口点
  • form1
  • disposing
  • 设计器
  • initializecomponent
  • components
  • drawing
  • load

得分解答快速导航

  • 帖主:panda0379
  • kwklover
  • q7a
  • chenyuming2004

相关链接

  • CSDN .NET频道
  • .NET类图书
  • C#类图书
  • .NET类源码下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
世纪乐知(北京)网络技术有限公司 版权所有, 京 ICP 证 020026 号
北京创新乐知广告有限公司 提供技术支持
Copyright © 2000-2007, CSDN.NET, All Rights Reserved
GongshangLogo