| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 902 人关注过本帖
标题:请大家说说关于winframe开发程序??
只看楼主 加入收藏
ghdjby
Rank: 1
等 级:禁止访问
帖 子:189
专家分:0
注 册:2007-1-10
结帖率:100%
收藏
 问题点数:0 回复次数:9 
请大家说说关于winframe开发程序??

请大家说说关于学习c#开发winframe程序的经验,你们一开始学习关于winframe程序时,用记事本编写程序还是直接用ide开发呢???下面是开发winframe程序的窗体初始化代码,请高手说说每一行代码的意思及其作用!
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace Windows
{
/// <summary>
/// Form1 的摘要说明。
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;

public Form1()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();

//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}

/// <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, 266);
this.Name = "Form1";
this.Text = "Form1";
this.Load += new System.EventHandler(this.Form1_Load);

}
#endregion

/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
}

private void Form1_Load(object sender, System.EventArgs e)
{

}
}
}

搜索更多相关主题的帖子: winframe 开发 
2007-05-09 21:23
guoxhvip
Rank: 8Rank: 8
来 自:聖西羅南看臺
等 级:贵宾
威 望:44
帖 子:4052
专家分:135
注 册:2006-10-8
收藏
得分:0 

直接用的Visual Studio.NET 2003,但自动生成的代码要搞清楚意思,这样可以节省很多开发时间(我也处于学习阶段,还谈不上高手)


愛生活 && 愛編程
2007-05-09 23:48
ghdjby
Rank: 1
等 级:禁止访问
帖 子:189
专家分:0
注 册:2007-1-10
收藏
得分:0 
你是自学的吗??请问上面的代码是什么意思??
2007-05-10 18:33
BooBo
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2007-5-10
收藏
得分:0 

//当你打开编辑器.net2003或是2005...就会自动生成这些代码

//using这些都是自动生成的命令空间,,相当于java里的引用包一样。。
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace Windows
{
/// <summary>
/// Form1 的摘要说明。
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;

public Form1()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();

//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}

/// <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, 266);
this.Name = "Form1";
this.Text = "Form1";
this.Load += new System.EventHandler(this.Form1_Load);

}
#endregion

/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]//程序开始从Main这里执行
static void Main()
{
Application.Run(new Form1());
}

private void Form1_Load(object sender, System.EventArgs e)//这是窗体的事件,,
{

}
}
}

2007-05-10 18:58
wangwenpeng
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2007-5-10
收藏
得分:0 
学习一下
2007-05-10 21:11
ghdjby
Rank: 1
等 级:禁止访问
帖 子:189
专家分:0
注 册:2007-1-10
收藏
得分:0 
楼上的你还是没有听懂我的意思,我是请高手说说每行代码的意思,可不是光总体说说就行了11??
2007-05-11 19:23
guoxhvip
Rank: 8Rank: 8
来 自:聖西羅南看臺
等 级:贵宾
威 望:44
帖 子:4052
专家分:135
注 册:2006-10-8
收藏
得分:0 

using System;//导入基本类和基类命名空间,类似java的Object
using System.Drawing;//导入对 GDI+ 基本图形功能的访问的命名空间
using System.Collections;//导入包含接口和类的命名空间
using System.ComponentModel;//实现组件和控件运行时和设计时行为的类
using System.Windows.Forms;//包含用于创建基于 Windows 的应用程序的类
using System.Data;//对数据库操作的命名空间 ADO.NET

namespace Windows//该程序的命名空间
{
/// <summary>
/// Form1 的摘要说明。
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;

public Form1() //构造方法
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();//窗体一运行就调用此方法

//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}

/// <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, 266);//窗体大小
this.Name = "Form1";//窗体名
this.Text = "Form1";//窗体最左上角显示的名字
// 为窗体Load事件注册一个方法,前面是委托,括号里是该委托调用的方法
this.Load += new System.EventHandler(this.Form1_Load);

}
#endregion

/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());//运行主窗体Form1
}

private void Form1_Load(object sender, System.EventArgs e)//窗体加载时候调用的方法,因为在上面已经注册了,你需要在窗体加载时要做的事情都可以写在这里面
{

}
}
}
大概是这样 好久没来C#论坛了 LZ还有这不叫winframe 叫winforms

[此贴子已经被作者于2007-6-21 4:28:13编辑过]


愛生活 && 愛編程
2007-06-21 04:20
飙马
Rank: 5Rank: 5
来 自:马里亚纳
等 级:贵宾
威 望:15
帖 子:779
专家分:280
注 册:2007-3-28
收藏
得分:0 
你这要求也太高了?
幸好我们guoxhvip热心人啊!

IT精英如同彩票:平凡的人像5块也中不到一样普遍,努力一点你中了5元保了个本。奖金越高,机率也就越小,付出的也越多,盖茨如同500万一样稀有。虽然每天忙碌而平凡,但我努力成为精英,做梦中了500万。
2007-06-21 09:02
bingren08
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2007-7-3
收藏
得分:0 

其实开发的主要就是思路明确!知道要用到那些模式!
和一些主要的界面!界面不是最主要的,关键是后台逻辑处理!

2007-07-03 20:52
jdfsl
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2007-7-3
收藏
得分:0 
winform,收到
2007-07-03 22:03
快速回复:请大家说说关于winframe开发程序??
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.011915 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved