新建立一个window应用程序项目,上面有
Form1.cs 和 Form1.Designer.cs
Form1.cs:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;namespace _7_04
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
}
}
---------------------------
Form1.Designer.cs:
namespace _7_04
{
partial class Form1
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null; /// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
} #region Windows 窗体设计器生成的代码 /// <summary>
/// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Text = "Form1";
} #endregion
}
}---------------------------
这两个文件有部份的代码是一至的,他们的关系是什么呢?
Form1.cs 和 Form1.Designer.cs
Form1.cs:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;namespace _7_04
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
}
}
---------------------------
Form1.Designer.cs:
namespace _7_04
{
partial class Form1
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null; /// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
} #region Windows 窗体设计器生成的代码 /// <summary>
/// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Text = "Form1";
} #endregion
}
}---------------------------
这两个文件有部份的代码是一至的,他们的关系是什么呢?
解决方案 »
- .net2.0下如何调用wcf ?
- datagrid添加了behavior后出现的问题
- 关于"联系我们" 这个功能模块的实现,求达人指教...
- 动态添加用户控件。。。高手请进
- 怎么从DateTimePiker中取出星期几?
- 我的帐号后边的括号里怎么才能有字呢??请指点
- 提一个问题,有没有人知道,怎么在打包的时候,把共享文件夹也打进去,到客户的机器上展开时也是共享文件夹
- 发射调用webservice方法,传List<T>提示此类型在上下文中不可用
- 如何用,C#通过ODBC.net获取数据库中的表名、字段等信息。
- 为什么把\\test去掉,连接数据库就失败!!!?????不明白!!谢了!
- 求救啊!vs2005的问题
- (高分急求)将特定文件夹中的.lnk文件导入contextMenuStrip
如果你用的vs2005 那么一般来说 就没有但是如果你使用vs2005 又安装了 web application 并且创建的是 web application工程
那么就有设计器代码了
如果你用的vs2005 那么一般来说 就没有
--------------
你搞错了...VS2003没有VS2005才会有...这里说的是 Windows 应用程序...partial class 是VS2003不支持的...