请教:C#中如何使用ShowDialog函数在两个Form中传递参数?

Alton1981 2003-08-25 02:39:01
我现在有两个Form:f1和f2,当在f1中调用f2.ShowDialog()后希望把f2中textbox1中的参数传给f1,并且可以让f1中的label显示f2传来的参数。我是这样设计的:

//在f1中(先执行):
private void button1_Click(object sender, System.EventArgs e)
{
Form2 f2=new Form2();
CC cc=new CC(); //CC是一个类,里面有一个属性Message;
f2.ShowDialog();
this.label1.Text=cc.Message;
}

//在f2中:
private void button1_Click(object sender, System.EventArgs e)
{
CC cc=new CC(); //CC是一个类,里面有一个属性Message;
cc.Message=this.textbox1.Text.trim();//假设textbox1中输入了"aaa";
}

请问我要如何做才能使f1中的label1.Text显示为"aaa"?

...全文
301 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
yuxi007 2003-08-25
  • 打赏
  • 举报
回复
可以使用全局变量,将f1,f2定义为全局变量,在f2中的textbox的值改变时,直接引用变量名f1就行了
xiaodele 2003-08-25
  • 打赏
  • 举报
回复
在f2中定义一个f1的变量,
public Form1 f1;
再在第一个函数中的f2.ShowDialog()前加入
f2.f1=this;
在f1中定义一个函数
public void setLabelText(string message)
{
label1.Text=message;
}
最后在f2中调用f1.setLabelText(message)就可以了
一、创建工程     如图所示,在集成开发环境的File菜单选择New->Project打开新建工程对话框我们选择工程类型为Visual C# Projects,在模板选择Windows  Application,在Name处输入工程名称:HelloWindows,在Location输入保存的路径。 确定后,系统自动为你生成了程序框架。   现在我们来简单地熟悉一下这个开发环境。     这就是我们的开发环境!   A区是我们的工具箱,包括对数据库、组件、窗体控件等的支持,我们都可以选择并加入到form,假如你找不到Toolbox,请在菜单View选择Toolbox以打开它。   B区是我们的设计工作区(包括对界面、代码的设计)。   C区相当于我们在VC6的workspace:Solution Explorer可以看成是以前的FileView,ResourceView和ClassView大家一定是很熟悉了,看到Solution ExplorerForm1.cs了吗?这就是Form1对应的C#文件,双击它就可以对Form1进行界面设计,鼠标右键单击Form1.cs在弹出菜单选择View Code便可以查看对应的代码。   D区是属性窗口:类似我们在VC6资源编辑器里的属性窗口,但功能更强大,对于屏幕上的组件比如按钮、列表框你都可以在这里直接修改其属性:如文字、背景色等。     我们接下去的任务是制作关于对话框,并添加菜单用于打开此对话框。     二、添加新的Form:关于对话框   选择菜单Project->Add Windows Form,在弹出的对话框选择类别为Local Project Items,选择模板为Windows Form,在Name输入文件名:AboutDlg.cs,确认。新的Form出现在工作区,我们在D区的属性对话框修改Text为“关于”,选择BackColor为淡蓝色,你也可以尝试其它属性的改变。   接下去,我们打开Toolbox,选择Win Forms的Label,然后在窗体画出,并在属性对话框修改Text为"VC知识库欢迎您!   http://www.vckbase.com",我们在Win Forms再加入一个Button,修改Text为“确认”。     至此,对话框的界面我们设计好了,但当用户按下确认按钮的时候,我们如何关闭对话框呢?我们双击“确认”按钮,这样系统会为按钮自动添加按钮的处理代码,在其我们添加Close()函数用以关闭,如下所示:     protected void button1_Click (object sender,   System.EventArgs e)   {   Close(); ///这是我们增加的一句   }     关于对话框已经完成了,我们接下去要做的是为主视窗添加菜单,当选择菜单的关于,我们就弹出“关于对话框”,让我们继续吧...     三、为主视窗添加菜单     在SolutionView双击Form1.cs打开Form1,在Toolbox->Win Forms选择MainMenu,并在Form1画出,在“TypeHere”字样处我们可以输入菜单条。     双击关于字样,系统会为我们添加该菜单条的处理代码,我们可以在其添加打开"关于对话框"的代码:     protected void button1_Click (object sender,   System.EventArgs e)   {   AboutDlg dlg = new AboutDlg();///分配AboutDlg对象   dlg.ShowDialog();///显示对话框   }     好了,我们的程序写好了,让我们按F5看看效果吧!     后记:C#的功能远远不止与此,本文的目的是让用过VC6的朋友对C#   WINDOWS应用程序的开发尽快上手,只当抛砖引玉。
没法下载,到这里折腾一把试试。 本文由abc2253130贡献 doc文档可能在WAP端浏览体验不佳。建议您优先选择TXT,或下载源文件到本机查看。 C#(WINFORM)学习 一、 C#基础 基础 类型和变量 类型和变量 类型 C# 支持两种类型:“值类型”和“引用类型”。值类型包括简单类型(如 char、int 和 float 等)、枚举类型和结构类型。引用类型包括类 (Class)类 型、接口类型、委托类型和数组类型。 变量的类型声明 变量的类型声明 每个变量必须预先声明其类型。如 int a; int b = 100; float j = 4.5; string s1; 用 object 可以表示所有的类型。 预定义类型 下表列出了预定义类型,并说明如何使用。 类型 object 说明 所有其他类型的最终 基类型 字符串类型; 字符串是 Unicode 字符序列 8 位有符号整型 16 位有符号整型 32 位有符号整型 64 位有符号整型 示例 object o = null; 范围 string sbyte short int long string s = "hello"; sbyte val = 12; short val = 12; int val = 12; long val1 = 12; -128 到 127 -32,768 到 32,767 -2,147,483,648 2,147,483,647 -9,223,372,036,854,775,808 到 第1页 C#(WINFORM)学习 long val2 = 34L; 到 9,223,372,036,854,775,807 byte ushort 8 位无符号整型 16 位无符号整型 byte val1 = 12; ushort val1 = 12; uint val1 = 12; uint 32 位无符号整型 uint val2 = 34U; ulong val1 = 12; ulong val2 = 34U; ulong 64 位无符号整型 ulong val3 = 56L; ulong val4 = 78UL; float 单精度浮点型 float val = 1.23F;7 位 double val1 = 1.23; double 双精度浮点型 double val2 = ±5.0 × 10?324 ±1.7 × 10 308 0 到 255 0 到 65,535 0 到 4,294,967,295 0 到 18,446,744,073,709,551,615 ±1.5 × 10?45 ±3.4 × 10 38 到 到 4.56D;15-16 布尔型;bool 值或为 真或为假 字符类型;char 值是 一个 Unicode 字符 精确的小数类型, 具有 28 个有效数字 bool val1 = true; bool val2 = false; char val = 'h'; decimal val = bool char decimal DateTime ±1.0 × 10?28 ±7.9 × 10 28 到 1.23M;28-29 变量转换 简单转换: float f = 100.1234f; 可以用括号转换: short s = (short)f 也可以利用 Convert 方法来转换: string s1; s1=Convert.ToString(a); MessageBox.Show(s1); 常用 Convert 方法有: 第2页 C#(WINFORM)学习 C# Convert.ToBoolean Convert.ToByte Convert.ToChar Convert.ToDateTime Convert.ToDecimal Convert.ToDouble Convert.ToInt16 Convert.ToInt32 Convert.ToInt64 Convert.ToSByte Convert.ToSingle Convert.ToString Convert.ToUInt16 Convert.ToUInt32 Convert.ToUInt64 备注 Math 类 常用科学计算方法: C# Math.Abs Math.Sqrt Math.Ro
/* API精灵 FOR C# 开始设计日期 2004.03.06 设计目的:简单快速对C#使用的API函数进行查询,并给出调用代码 设计进度: 2004.03.09 完成对的查询功能,包括 代码调用,文注释,所需的DLL库,与C#函数对应关系 2004.03.10 0:48:52 完成了用StringBuilder数组对原ComboBox的替换,可以使程序不用从新读取数据库就可以刷新修改后的信息! 2004.03.10 18:00:00 完成了用ArrayList对StringBuilder数组的替换节省2M内存 2004.03.11 21:10:15 完成滚动字幕的设置,启用了一个TIMER控件,然后设置时间,删除字符串的第一个字母已达到滚动效果! 2004.03.11 22:02:00 改正更新时出现空值出错问题,新填函数isnull 2004.03.12 13:22:08 完成关键字高亮显示 高亮显示函数 mykeywords 2004.03.12 22:08:20 加强了高亮显示函数 mykeywords的功能,使其能识别不同的关键字并显示不同的颜色 2004.03.14 01:40:00 完成对CONST的查询,并且增加了 mykeywords1函数,使其关键字显示性能提高 2004.03.14 13:12:00 添加了提示信息,提示信息设置在函数 mytips() 2004.03.15 21:51:20 更改数据库和WINAPI.TXT路径为程序运行路径 2004.03.15 22:31:50 添加了鼠标右键信息 2004.03.15 23.23:30 添加了数据库密码 2004.03.16 23:24:30 添加了版权信息以及相应提示 */ using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; using System.Data.OleDb; using System.Runtime.InteropServices; using System.IO; namespace API精灵 { /// /// Form1 的摘要说明。 /// 这个版本没有使用oleDbDataAdapter+DataSet对数据进行存取,而是使用的OleDbCommand +OleDbDataReader 的形式。 /// 主要是想试验一下不用oleDbDataAdapter+DataSet的数据存取速度。 /// public class Form1 : System.Windows.Forms.Form { private System.Windows.Forms.Button button1; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.GroupBox groupBox3; private System.Windows.Forms.Button button4; private System.Windows.Forms.TextBox mysearch; private System.Windows.Forms.ListBox tiplist; private System.Windows.Forms.ComboBox select_type; private System.Windows.Forms.TextBox dlltext; /// /// 必需的设计器变量。 /// //自定义变量 private ArrayList fundll = new ArrayList();//保存读取出来的DLL内容 private ArrayList funtips = new ArrayList();//保存读取出来的文提示信息 private ArrayList funcode = new ArrayList();//保存读取出来的C#调用代码 private ArrayList funmat = new ArrayList();//保存读取出来的C#对应函数 private ArrayList funwin9x = new ArrayList();//保存读取出来的WIN9X private ArrayList funwin2k = new ArrayList();//保存读取出来的WIN2K private int nowselect = 0; private string oldscoll_text; private int nowtypeselect = 0; private string nowpath = @System.Environment.CurrentDirectory+@"\"; private string dbpassword = "ling_feng_work"; public string myConnstr; public OleDbConnection myconn ;//创建一个新连接 private string mysql ;//查询语句 private string sql_update; private System.Windows.Forms.RichTextBox tipsmemo; private System.Windows.Forms.TextBox mat_text; private OleDbCommand mycommand = new OleDbCommand(); private System.Windows.Forms.RichTextBox codememo; private System.Windows.Forms.GroupBox groupBox4; private System.Windows.Forms.CheckBox win9x; private System.Windows.Forms.GroupBox groupBox5; private System.Windows.Forms.CheckBox win2k; private System.Windows.Forms.CheckBox e_add; private System.Windows.Forms.CheckBox e_modify; private System.Windows.Forms.Button b_modify; private System.Windows.Forms.Button b_add; private System.Windows.Forms.Timer timer1; private System.Windows.Forms.ToolTip toolTip1; private System.Windows.Forms.ContextMenu mypop; private System.Windows.Forms.MenuItem menuItem1; private System.ComponentModel.IContainer components; public Form1() { // // Windows 窗体设计器支持所必需的 // InitializeComponent(); // // TODO: 在 InitializeComponent 调用后添加任何构造函数代码 // } /// /// 清理所有正在使用的资源。 /// protected override void Dispose( bool disposing ) { if( disposing ) { if (components != null) { components.Dispose(); } } base.Dispose( disposing ); } #region Windows 窗体设计器生成的代码 /// /// 设计器支持所需的方法 - 不要使用代码编辑器修改 /// 此方法的内容。 /// private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1)); this.button1 = new System.Windows.Forms.Button(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.tiplist = new System.Windows.Forms.ListBox(); this.select_type = new System.Windows.Forms.ComboBox(); this.mat_text = new System.Windows.Forms.TextBox(); this.mysearch = new System.Windows.Forms.TextBox(); this.dlltext = new System.Windows.Forms.TextBox(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.tipsmemo = new System.Windows.Forms.RichTextBox(); this.mypop = new System.Windows.Forms.ContextMenu(); this.menuItem1 = new System.Windows.Forms.MenuItem(); this.groupBox3 = new System.Windows.Forms.GroupBox(); this.codememo = new System.Windows.Forms.RichTextBox(); this.b_modify = new System.Windows.Forms.Button(); this.b_add = new System.Windows.Forms.Button(); this.button4 = new System.Windows.Forms.Button(); this.groupBox4 = new System.Windows.Forms.GroupBox(); this.win2k = new System.Windows.Forms.CheckBox(); this.win9x = new System.Windows.Forms.CheckBox(); this.groupBox5 = new System.Windows.Forms.GroupBox(); this.e_add = new System.Windows.Forms.CheckBox(); this.e_modify = new System.Windows.Forms.CheckBox(); this.timer1 = new System.Windows.Forms.Timer(this.components); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.groupBox1.SuspendLayout(); this.groupBox2.SuspendLayout(); this.groupBox3.SuspendLayout(); this.groupBox4.SuspendLayout(); this.groupBox5.SuspendLayout(); this.SuspendLayout(); // // button1 // this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.button1.Location = new System.Drawing.Point(224, 395); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(75, 24); this.button1.TabIndex = 10; this.button1.Text = "关 于"; this.button1.Click += new System.EventHandler(this.button1_Click); // // groupBox1 // this.groupBox1.Controls.Add(this.tiplist); this.groupBox1.Controls.Add(this.select_type); this.groupBox1.Controls.Add(this.mat_text); this.groupBox1.Controls.Add(this.mysearch); this.groupBox1.Controls.Add(this.dlltext); this.groupBox1.Location = new System.Drawing.Point(8, 8); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(200, 168); this.groupBox1.TabIndex = 1; this.groupBox1.TabStop = false; this.groupBox1.Text = "API查询"; // // tiplist // this.tiplist.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.tiplist.ItemHeight = 12; this.tiplist.Location = new System.Drawing.Point(8, 43); this.tiplist.Name = "tiplist"; this.tiplist.Size = new System.Drawing.Size(184, 110); this.tiplist.TabIndex = 1; this.tiplist.Visible = false; this.tiplist.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tiplist_KeyDown); this.tiplist.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.tiplist_KeyPress); this.tiplist.DoubleClick += new System.EventHandler(this.tiplist_DoubleClick); this.tiplist.MouseUp += new System.Windows.Forms.MouseEventHandler(this.tiplist_MouseUp); this.tiplist.MouseLeave += new System.EventHandler(this.tiplist_MouseLeave); this.tiplist.SelectedIndexChanged += new System.EventHandler(this.tiplist_SelectedIndexChanged); // // select_type // this.select_type.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.select_type.Items.AddRange(new object[] { "API函数查询", "常量定义查询"}); this.select_type.Location = new System.Drawing.Point(8, 61); this.select_type.Name = "select_type"; this.select_type.Size = new System.Drawing.Size(184, 20); this.select_type.TabIndex = 2; this.select_type.SelectedIndexChanged += new System.EventHandler(this.select_type_SelectedIndexChanged); // // mat_text // this.mat_text.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.mat_text.Location = new System.Drawing.Point(8, 134); this.mat_text.Name = "mat_text"; this.mat_text.Size = new System.Drawing.Size(184, 21); this.mat_text.TabIndex = 4; this.mat_text.Text = "C#对应函数:"; this.mat_text.MouseDown += new System.Windows.Forms.MouseEventHandler(this.mat_text_MouseDown); // // mysearch // this.mysearch.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.mysearch.Location = new System.Drawing.Point(8, 24); this.mysearch.Name = "mysearch"; this.mysearch.Size = new System.Drawing.Size(184, 21); this.mysearch.TabIndex = 0; this.mysearch.Text = ""; this.mysearch.KeyDown += new System.Windows.Forms.KeyEventHandler(this.mysearch_KeyDown); this.mysearch.MouseDown += new System.Windows.Forms.MouseEventHandler(this.mysearch_MouseDown); this.mysearch.TextChanged += new System.EventHandler(this.mysearch_TextChanged); // // dlltext // this.dlltext.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.dlltext.Location = new System.Drawing.Point(8, 97); this.dlltext.Name = "dlltext"; this.dlltext.Size = new System.Drawing.Size(184, 21); this.dlltext.TabIndex = 3; this.dlltext.Text = ""; this.dlltext.TextChanged += new System.EventHandler(this.dlltext_TextChanged); // // groupBox2 // this.groupBox2.Controls.Add(this.tipsmemo); this.groupBox2.Location = new System.Drawing.Point(216, 8); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(200, 168); this.groupBox2.TabIndex = 2; this.groupBox2.TabStop = false; this.groupBox2.Text = "函数注释"; // // tipsmemo // this.tipsmemo.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.tipsmemo.ContextMenu = this.mypop; this.tipsmemo.Location = new System.Drawing.Point(8, 16); this.tipsmemo.Name = "tipsmemo"; this.tipsmemo.Size = new System.Drawing.Size(184, 144); this.tipsmemo.TabIndex = 0; this.tipsmemo.Text = ""; this.tipsmemo.MouseEnter += new System.EventHandler(this.richTextBox1_MouseEnter); // // mypop // this.mypop.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.menuItem1}); // // menuItem1 // this.menuItem1.Index = 0; this.menuItem1.Text = "复制信息"; this.menuItem1.Click += new System.EventHandler(this.menuItem1_Click); // // groupBox3 // this.groupBox3.Controls.Add(this.codememo); this.groupBox3.Location = new System.Drawing.Point(8, 221); this.groupBox3.Name = "groupBox3"; this.groupBox3.Size = new System.Drawing.Size(408, 168); this.groupBox3.TabIndex = 3; this.groupBox3.TabStop = false; this.groupBox3.Text = "代码调用"; // // codememo // this.codememo.ContextMenu = this.mypop; this.codememo.Location = new System.Drawing.Point(8, 16); this.codememo.Name = "codememo"; this.codememo.Size = new System.Drawing.Size(392, 144); this.codememo.TabIndex = 0; this.codememo.Text = ""; this.codememo.TextChanged += new System.EventHandler(this.codememo_TextChanged); // // b_modify // this.b_modify.Enabled = false; this.b_modify.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.b_modify.Location = new System.Drawing.Point(120, 395); this.b_modify.Name = "b_modify"; this.b_modify.Size = new System.Drawing.Size(75, 24); this.b_modify.TabIndex = 4; this.b_modify.Text = "修改信息"; this.b_modify.Click += new System.EventHandler(this.button2_Click); // // b_add // this.b_add.Enabled = false; this.b_add.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.b_add.Location = new System.Drawing.Point(16, 395); this.b_add.Name = "b_add"; this.b_add.Size = new System.Drawing.Size(75, 24); this.b_add.TabIndex = 5; this.b_add.Text = "添加新项"; // // button4 // this.button4.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.button4.Location = new System.Drawing.Point(328, 395); this.button4.Name = "button4"; this.button4.Size = new System.Drawing.Size(75, 24); this.button4.TabIndex = 6; this.button4.Text = "退 出"; this.button4.Click += new System.EventHandler(this.button4_Click); // // groupBox4 // this.groupBox4.Controls.Add(this.win2k); this.groupBox4.Controls.Add(this.win9x); this.groupBox4.Location = new System.Drawing.Point(8, 176); this.groupBox4.Name = "groupBox4"; this.groupBox4.Size = new System.Drawing.Size(200, 40); this.groupBox4.TabIndex = 11; this.groupBox4.TabStop = false; // // win2k // this.win2k.Location = new System.Drawing.Point(104, 11); this.win2k.Name = "win2k"; this.win2k.Size = new System.Drawing.Size(80, 24); this.win2k.TabIndex = 1; this.win2k.Text = "支持win2k"; // // win9x // this.win9x.Location = new System.Drawing.Point(16, 11); this.win9x.Name = "win9x"; this.win9x.TabIndex = 0; this.win9x.Text = "支持win9x"; // // groupBox5 // this.groupBox5.Controls.Add(this.e_add); this.groupBox5.Controls.Add(this.e_modify); this.groupBox5.Location = new System.Drawing.Point(216, 176); this.groupBox5.Name = "groupBox5"; this.groupBox5.Size = new System.Drawing.Size(200, 40); this.groupBox5.TabIndex = 12; this.groupBox5.TabStop = false; // // e_add // this.e_add.Location = new System.Drawing.Point(112, 10); this.e_add.Name = "e_add"; this.e_add.Size = new System.Drawing.Size(80, 24); this.e_add.TabIndex = 5; this.e_add.Text = "允许添加"; this.e_add.CheckedChanged += new System.EventHandler(this.e_add_CheckedChanged); // // e_modify // this.e_modify.Location = new System.Drawing.Point(16, 10); this.e_modify.Name = "e_modify"; this.e_modify.Size = new System.Drawing.Size(76, 24); this.e_modify.TabIndex = 4; this.e_modify.Text = "允许修改"; this.e_modify.CheckedChanged += new System.EventHandler(this.e_modify_CheckedChanged); // // timer1 // this.timer1.Interval = 500; this.timer1.Tick += new System.EventHandler(this.timer1_Tick); // // Form1 // this.AutoScaleBaseSize = new System.Drawing.Size(6, 14); this.ClientSize = new System.Drawing.Size(424, 429); this.Controls.Add(this.groupBox5); this.Controls.Add(this.groupBox4); this.Controls.Add(this.button4); this.Controls.Add(this.b_add); this.Controls.Add(this.b_modify); this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox1); this.Controls.Add(this.button1); this.Controls.Add(this.groupBox2); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MaximizeBox = false; this.Name = "Form1"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "API精灵FOR C#"; this.Load += new System.EventHandler(this.Form1_Load); this.groupBox1.ResumeLayout(false); this.groupBox2.ResumeLayout(false); this.groupBox3.ResumeLayout(false); this.groupBox4.ResumeLayout(false); this.groupBox5.ResumeLayout(false); this.ResumeLayout(false); } #endregion /// /// 应用程序的主入口点。 /// [STAThread] static void Main() { Application.Run(new Form1()); } [DllImport("user32.dll", EntryPoint="ShowWindow")] public static extern int ShowWindow ( int hwnd, int nCmdShow ); private void button1_Click(object sender, System.EventArgs e) { AboutForm myabout = new AboutForm(); myabout.ShowDialog(); } /// /// 填写mysearch的内容。 /// private void search_comp() { if (tiplist.SelectedIndex>-1) mysearch.Text = tiplist.SelectedItem.ToString(); tiplist.Visible = false ; mysearch.Select(); } /// /// 自动填写提示内容。 /// private void autocomp() { if (tiplist.SelectedIndex>-1) try { if (this.nowtypeselect==0) //================查询函数 { this.nowselect = tiplist.SelectedIndex; dlltext.Text = fundll[tiplist.SelectedIndex].ToString();//else tipsmemo.Text = funtips[tiplist.SelectedIndex].ToString(); codememo.Text = funcode[tiplist.SelectedIndex].ToString(); mat_text.Text = funmat[tiplist.SelectedIndex].ToString(); this.oldscoll_text = mat_text.Text; if (funwin9x[tiplist.SelectedIndex].ToString()==("Yes")) win9x.Checked=true; else win9x.Checked=false; if (funwin2k[tiplist.SelectedIndex].ToString()==("Yes")) win2k.Checked=true; else win2k.Checked=false; //滚动文字 if (mat_text.TextLength>30) timer1.Enabled = true; else timer1.Enabled = false; } else { dlltext.Text = ""; tipsmemo.Text = ""; codememo.Text = ""; win9x.Checked = false; win2k.Checked = false; } //******************** if (this.nowtypeselect==1) { this.nowselect = tiplist.SelectedIndex; codememo.Text = funcode[tiplist.SelectedIndex].ToString(); } //******************** //================= } catch { dlltext.Text = "没有找到相应连接库"; tipsmemo.Text = "没有找到相应提示"; codememo.Text = "没有找到相应调用代码"; mat_text.Text = "没有找到相应C#函数"; } } // /// /// 手动释放一些内存。 /// private void mydisp() { tipsmemo.Clear(); codememo.Clear(); tiplist.Items.Clear(); // ===== fundll.Clear();//保存读取出来的DLL内容 funtips.Clear();//保存读取出来的文提示信息 funcode.Clear();//保存读取出来的C#调用代码 funmat.Clear();//保存读取出来的C#对应函数 funwin9x.Clear();//保存读取出来的WIN9X funwin2k.Clear();//保存读取出来的WIN2K } private void mysearch_TextChanged(object sender, System.EventArgs e) { tiplist.Visible = true ; //自动完成功能。 tiplist.SelectedIndex = (tiplist.FindString(mysearch.Text,-1)) ;//加上这句,保证TIPLIST跟着自动变化 nowselect = tiplist.SelectedIndex; autocomp(); //设置提示信息 mytips(); } private void mysearch_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) { if ((e.KeyCode == Keys.Down) || (e.KeyCode == Keys.Up)) tiplist.Focus(); if (e.KeyCode == Keys.Enter) { search_comp(); if (this.nowtypeselect==0) mykeyword(); if (this.nowtypeselect==1) mykeyword1(); } if (e.KeyCode == Keys.Escape) { tiplist.Visible = false ; } } private void tiplist_MouseLeave(object sender, System.EventArgs e) { } private void tiplist_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e) { } private void tiplist_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { this.search_comp(); if (this.nowtypeselect==0) mykeyword(); else mykeyword1(); } if (e.KeyCode == Keys.Escape) { tiplist.Visible = false ; } } private void tiplist_DoubleClick(object sender, System.EventArgs e) { this.search_comp(); if (this.nowtypeselect==0) mykeyword(); else mykeyword1(); } private void Form1_Load(object sender, System.EventArgs e) { //初始化数据库 initdatabase(); //MessageBox.Show(this,"欢迎使用 共享版\n 本版对使用功能上略有限制\n 且不提供数据库更新!\n 如想获得更多信息请与我联系。\n dong_teng@tom.com","提示",MessageBoxButtons.OK,MessageBoxIcon.Information); select_type.SelectedIndex = 0; AboutForm myabout = new AboutForm(); myabout.ShowDialog(); } // private void mytips() { //设置提示信息 if ((this.nowselect>-1)&(this.nowtypeselect==0)) { toolTip1.SetToolTip(this.dlltext,"所在动态连接库: "+this.fundll[this.nowselect].ToString()); toolTip1.SetToolTip(this.mat_text,"在C#对应的函数: "+this.funmat[this.nowselect].ToString()); toolTip1.SetToolTip(this.codememo,"函数 "+this.tiplist.SelectedItem.ToString()+" 在C#的调用代码,可以手动修改"); toolTip1.SetToolTip(this.tipsmemo,"函数 "+this.tiplist.SelectedItem.ToString()+" 的注释信息,可以手动修改"); } else if ((this.nowselect>-1)&(this.nowtypeselect==1)) { toolTip1.SetToolTip(this.codememo,"常量 "+this.tiplist.SelectedItem.ToString()+" 在C#的调用代码"); toolTip1.SetToolTip(this.dlltext,"没有相关信息"); toolTip1.SetToolTip(this.mat_text,"没有相关信息"); toolTip1.SetToolTip(this.tipsmemo,"没有相关信息"); } } // private void initdatabase() { string dbpath = @nowpath+"winapi.mdb"; tiplist.Items.Clear(); //@"Provider=Microsoft.Jet.OleDB.4.0;Data Source="+dbpath+";User Id=admin;Password="+this.dbpassword ; //"Provider=Microsoft.Jet.OleDB.4.0;Data Source=your mdb filename;Jet OLEDB:Database Password='pass'" ; this.myConnstr = @"Provider=Microsoft.Jet.OleDB.4.0;Data Source="+dbpath+";User Id=admin;Jet OLEDB:Database Password="+this.dbpassword ; this.myconn= new OleDbConnection(myConnstr); mysql= @"select Fun_name,Fun_dll,Fun_tips,Fun_code,Fun_com,win9x,win2k from winapi"; using(myconn) { myconn.Open(); // if (myconn.State.ToString() == "Open") MessageBox.Show("打开成功!"); //数据处理 // OleDbCommand mycommand = new OleDbCommand(mysql,myconn); mycommand.CommandText = mysql; mycommand.Connection = myconn; OleDbDataReader myreader = mycommand.ExecuteReader(); int i=0; while (myreader.Read()) { tiplist.Items.Add(myreader["Fun_name"]); fundll.Add(myreader["fun_dll"].ToString()); funtips.Add(myreader["fun_tips"].ToString()); funcode.Add(myreader["fun_code"].ToString()); funmat.Add(myreader["fun_com"].ToString()); funwin9x.Add(myreader["win9x"].ToString()); funwin2k.Add(myreader["win2k"].ToString()); i++; } myconn.Close(); myreader.Close(); } } //更新缓存 private void memo_update() { fundll[nowselect] = dlltext.Text; funtips[nowselect] = this.tipsmemo.Text; funcode[nowselect] = this.codememo.Text; funmat[nowselect] = this.mat_text.Text; if (win9x.Checked) funwin9x[nowselect]="Yes" ;else funwin9x[nowselect]="No"; if (win2k.Checked) funwin2k[nowselect]="Yes" ;else funwin2k[nowselect]="No"; } // private void oleDbConnection1_InfoMessage(object sender, System.Data.OleDb.OleDbInfoMessageEventArgs e) { } //==============从WINAPI.TXT读取CONST并拆分 private void mysplip() { //string dbpath = @System.Environment.CurrentDirectory+@"\winapi.mdb"; string filename =@nowpath +"winapi.txt"; string nextline; tiplist.Items.Clear(); StreamReader sr = new StreamReader(filename); while ((nextline = sr.ReadLine())!=null) { if (nextline.StartsWith("public const")) { string[] ss = nextline.Split('='); tiplist.Items.Add(ss[0].Substring(16).Trim()); funcode.Add(nextline); } } sr.Close(); } //============================== private void select_type_SelectedIndexChanged(object sender, System.EventArgs e) { if (select_type.SelectedIndex != this.nowtypeselect) { this.mydisp(); switch (select_type.SelectedIndex) { case 0:initdatabase();this.nowtypeselect=select_type.SelectedIndex;break; case 1:mysplip();this.nowtypeselect=select_type.SelectedIndex;this.dlltext.Clear();this.mat_text.Clear();break; } isenable(this.nowtypeselect); } } private void dlltext_TextChanged(object sender, System.EventArgs e) { } private void richTextBox1_MouseEnter(object sender, System.EventArgs e) { tiplist.Visible = false ; } private void mysearch_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { tiplist.Visible = false ; mysearch.Focus(); } private void tiplist_SelectedIndexChanged(object sender, System.EventArgs e) { autocomp(); } /// /// 修改内容。 /// private void fun_update() { using(myconn) { myconn.ConnectionString = myConnstr; myconn.Open(); try { //if (myconn.State.ToString() == "Open") MessageBox.Show("打开成功!"); isnull();//判断是否有无效值 string str_win9x,str_win2k; if (win9x.Checked) str_win9x = "Yes" ; else str_win9x = "No"; if (win2k.Checked) str_win2k = "Yes" ; else str_win2k = "No"; sql_update = "update winapi set Fun_dll = '"+dlltext.Text+"'"+" , Fun_tips = '"+tipsmemo.Text+"'"+" , Fun_code = '"+codememo.Text+"'"+" , Fun_com ='"+mat_text.Text+"' "; sql_update +=" , win9x = '" + str_win9x +"' " + ", win2k = '" + str_win2k+"' "; sql_update +=" where Fun_name ='"+ mysearch.Text+"'"; mycommand.Connection = myconn; mycommand.CommandText = sql_update; mycommand.ExecuteNonQuery(); myconn.Close(); memo_update(); MessageBox.Show(this,"恭喜!更新成功!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information); } catch { // tipsmemo.Text = sql_update; MessageBox.Show("没有找到相应记录,更新失败!"); } } } //判断是更新的部分是否有效(不能为空) private void isnull() { if (this.mat_text.Text=="") this.mat_text.Text="没有相关信息"; if (this.codememo.Text=="") this.codememo.Text="没有相关信息"; if (this.tipsmemo.Text=="") this.tipsmemo.Text="没有相关信息"; if (this.dlltext.Text=="") this.dlltext.Text="没有相关信息"; } //关键字高亮显示 private void mykeyword() { string[] keywords = new string[5]; keywords[0]=mysearch.Text; keywords[1]="string"; keywords[2]="ref"; keywords[3]="int"; keywords[4]="static extern"; for(int i=0;i0) { index++; switch(i) { case 0: codememo.SelectionColor = Color.Red;break; case 1: codememo.SelectionColor = Color.Green;break; case 2: codememo.SelectionColor = Color.Brown;break; case 3: codememo.SelectionColor = Color.Blue;break; case 4: codememo.SelectionColor = Color.Green;break; //default:codememo.SelectionColor = Color.Blue;break; } } } } // //CONST关键字高亮显示 private void mykeyword1() { string[] keywords = new string[5]; keywords[0]=mysearch.Text; keywords[1]="="; keywords[2]="0"; keywords[3]="int"; keywords[4]="const"; for(int i=0;i0) { index++; switch(i) { case 0: codememo.SelectionColor = Color.Red;break; case 1: codememo.SelectionColor = Color.Blue;break; case 2: codememo.SelectionColor = Color.Green;break; case 3: codememo.SelectionColor = Color.Blue;break; case 4: codememo.SelectionColor = Color.Green;break; //default:codememo.SelectionColor = Color.Blue;break; } if (index>codememo.TextLength) break; } } } // private void button2_Click(object sender, System.EventArgs e) { this.fun_update(); } private void isenable(int i_temp) { if (i_temp==0) { win9x.Enabled=true; win2k.Enabled=true; e_modify.Enabled=true; e_add.Enabled=true; b_modify.Enabled=true; b_add.Enabled=true; } else { win9x.Enabled=false; win2k.Enabled=false; e_modify.Enabled=false; e_add.Enabled=false; b_modify.Enabled=false; b_add.Enabled=false; } } private void button4_Click(object sender, System.EventArgs e) { Application.Exit(); } private void e_modify_CheckedChanged(object sender, System.EventArgs e) { if (e_modify.Checked) b_modify.Enabled = true; else b_modify.Enabled = false; } private void e_add_CheckedChanged(object sender, System.EventArgs e) { if (e_add.Checked) b_add.Enabled = true; else b_add.Enabled = false; } private void timer1_Tick(object sender, System.EventArgs e) { if (this.mat_text.TextLength>0) mat_text.Text = mat_text.Text.Remove(0,1); else mat_text.Text = oldscoll_text; } private void mat_text_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { timer1.Enabled = false ; mat_text.Text = oldscoll_text; } private void codememo_TextChanged(object sender, System.EventArgs e) { } private void tiplist_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e) { } private void menuItem1_Click(object sender, System.EventArgs e) { Control ct = this.ActiveControl; string temp = ct.Text; Clipboard.SetDataObject(temp); } private void menuItem2_Click(object sender, System.EventArgs e) { } } }
C#全能速查宝典》共分为8章,分别介绍了C#语言基础、Windows窗体及常用控件、Windows高级控件、控件公共属性、方法及事件、数据库开发、文件、数据流与注册表、GDI+绘图技术和C#高级编程,共包含562个C#编程常用的属性、方法、类和各种技术,每一个知识点都配有具体的示例,便于读者理解。 《C#全能速查宝典》所讲的知识点按照功能和字母进行排序,读者既可以按照功能顺序查找,又可以按照字母顺序学习。 《C#全能速查宝典》不仅适合C#程序设计初学者,也可作为、高级程序开发人员的参考手册。 ============================================================ 图书目录 第1章 C#语言基础 1 1.1 常用概念、关键字及基础类 1 1.1.1 abstract关键字——抽象 1 1.1.2 as操作符——引用类型转换 3 1.1.3 base关键字——从派生类访问基类的成员 3 1.1.4 变量——存储特定类型的数据 4 1.1.5 Console类——控制台的输入流、输出流和错误流 6 1.1.6 Convert类——类型转换 8 1.1.7 常量——值不改变的量 9 1.1.8 Dispose方法——释放资源 10 1.1.9 迭代器——相同类型的值的有序序列的一段代码 10 1.1.10 泛型——处理算法和数据结构 11 1.1.11 分部类——将一个类分成几部分 12 1.1.12 is操作符——检查变量是否为指定的类型 14 1.1.13 lock关键字——锁定 15 1.1.14 namespace关键字——定义命名空间 15 1.1.15 new运算符——创建一个新的类型实例 16 1.1.16 Object类型——所有类型的基类 17 1.1.17 OOP技术——面向对象编程技术 18 1.1.18 ReadLine方法——从当前流读取一行字符 20 1.1.19 typeof运算符——获得系统原型对象的类型 21 1.1.20 using关键字——引入命名空间 22 1.1.21 WriteLine方法——写入流 23 1.2 数学方法类——Math 25 1.2.1 Abs方法——返回指定数字的绝对值 25 1.2.2 Acos方法——返回余弦值为指定数字的角度 26 1.2.3 Asin方法——返回正弦值为指定数字的角度 26 1.2.4 Atan方法——返回正切值为指定数字的角度 27 1.2.5 Pow方法——返回指定数字的指定次幂 27 1.2.6 Round方法——将小数值舍入到指定的精度 28 1.3 流程控制语句 29 1.3.1 break语句——跳出循环 29 1.3.2 case语句——比较表达式以确定结果 30 1.3.3 continue语句——继续执行下一个循环 31 1.3.4 do…while语句——循环语句 31 1.3.5 for语句——循环语句 32 1.3.6 foreach语句——枚举一个集合的元素 33 1.3.7 goto语句——跳转到标签 34 1.3.8 if…else语句——条件判断语句 36 1.3.9 return语句——返回 38 1.3.10 switch case语句——条件判断语句 39 1.3.11 throw语句——显式引发异常 40 1.3.12 try…catch…finally语句——捕捉异常 42 1.3.13 while语句——循环语句 43 1.4 字符串处理 44 1.4.1 AddDays方法——添加天数 44 1.4.2 AddString方法——添加文本字符串 45 1.4.3 Compare方法——比较两个字符串 46 1.4.4 CompareTo方法——比较两个字符串对象 47 1.4.5 DATEADD函数——在指定日期上加一段时间 48 1.4.6 DateDiff方法——获取日期时间的间隔数 48 1.4.7 DateTime结构——表示时间上的一刻 50 1.4.8 DAY函数——返回日期部分的整数 51 1.4.9 DayOfWeek属性——获取星期几 52 1.4.10 Equals方法——比较两个字符串对象 53 1.4.11 First函数——返回查询结果的第一个记录 55 1.4.12 FirstDayOfWeek属性——获取或设置一周的第一天 56 1.4.13 Format方法——格式化字符串 56 1.4.14 GETDATE函数——返回当前系统日期和时间 58 1.4.15 GetDayOfMonth方法——返回几号 59 1.4.16 GetDayOfWeek方法——返回星期几 59 1.4.17 GetDayOfYear方法——返回第几天 60 1.4.18 GetDaysInMonth方法——返回指定月份的天数 60 1.4.19 GetDaysInYear方法——返回指定年份的天数 61 1.4.20 GetMonth方法——返回指定日期的月份 61 1.4.21 GetMonthsInYear方法——返回指定年份的月数 62 1.4.22 GetText方法——检索文本数据 63 1.4.23 GetYear方法——返回指定日期的年份 64 1.4.24 IndexOf方法——确定指定字符在字符串的索引 65 1.4.25 IsLeapYear方法——判断年份是否为闰年 67 1.4.26 IsMatch方法——搜索正则表达式匹配项 67 1.4.27 IsUpper方法——判断是否大写 68 1.4.28 Join方法——串联字符串 69 1.4.29 LastIndexOf方法——确定字符在字符串最后索引 70 1.4.30 Matches方法——检查字符串是否有重复的词出现 71 1.4.31 MONTH函数——返回指定日期月部分的整数 73 1.4.32 PadLeft方法——在左边用空格填充 73 1.4.33 PadRight方法——在右边用空格填充 74 1.4.34 Random类——伪随机数生成器 75 1.4.35 Regex类——正则表达式 76 1.4.36 Split方法——分割字符串 78 1.4.37 String类——字符串 79 1.4.38 StringBuilder类——可变字符串 82 1.4.39 Substring方法——截取字符串 83 1.4.40 TimeSpan对象——表示时间间隔或持续时间 84 1.4.41 ToInt32方法——转换为32位有符号整数 85 1.4.42 ToLongDateString 方法——转换为长日期字符串 86 1.4.43 ToLongTimeString 方法——转换为长时间字符串 87 1.4.44 ToLower方法——转换为小写 87 1.4.45 ToShortDateString方法——转换为短日期字符串 88 1.4.46 ToShortTimeString方法——转换为短时间字符串 88 1.4.47 ToString方法——转换为字符串 89 1.4.48 ToUpper方法——转换为大写 90 1.4.49 Trim方法——移除所有空白字符 91 1.4.50 TrimEnd方法——从尾部移除匹配项 92 1.4.51 TrimStart方法——从开始移除匹配项 92 1.4.52 YEAR函数——返回指定日期的年份的整数 93 1.5 数组与集合 93 1.5.1 Add方法——添加项 93 1.5.2 ArrayList类——集合 95 1.5.3 AsEnumerable方法——转换为IEnumerable类型 97 1.5.4 Clear方法——清空内容 98 1.5.5 Contains方法——确定是否包含某项 99 1.5.6 ContainsKey方法——确定哈希表是否包含特定键 100 1.5.7 ContainsText方法——确定剪贴板是否存在数据 101 1.5.8 ContainsValue方法——确定哈希表是否包含特定值 101 1.5.9 Count属性——获取数目 102 1.5.10 GetEnumerator方法——循环访问对象 103 1.5.11 GetEnvironmentVariables方法——检索环境变量 104 1.5.12 Hashtable类——哈希表 106 1.5.13 Insert方法——插入项 110 1.5.14 Item属性——获取或设置指定索引处的元素 111 1.5.15 Length属性——获取长度 112 1.5.16 Next方法——返回一个指定范围内的随机数 113 1.5.17 Queue类——队列 115 1.5.18 Remove方法——移除指定项 116 1.5.19 RemoveAt方法——移除指定索引处的项 118 1.5.20 Replace方法——替换文件或字符串 119 1.5.21 Reverse方法——反转数组元素 120 1.5.22 Sort方法——数组排序 121 1.5.23 Stack类——堆栈 123 第2章 Windows窗体及常用控件 126 2.1 Form窗体 126 2.1.1 AcceptButton属性——设置接受按钮 126 2.1.2 Activate事件——当激活窗体时发生 126 2.1.3 Appllication类——提供管理应用程序的静态方法 126 2.1.4 CancelButton属性——设置取消按钮 128 2.1.5 Computer类——提供操作计算机组件的属性 129 2.1.6 ComputerInfo类——获取计算机信息 130 2.1.7 Control类——定义控件基类 131 2.1.8 Environment类——提供当前环境和平台的信息 134 2.1.9 Form窗体——可视化界面 136 2.1.10 FormClosed事件——关闭窗体后事件 139 2.1.11 FormClosing事件——关闭窗体前事件 139 2.1.12 Icon属性——设置图标 139 2.1.13 IsMdiContainer属性——设置父窗体 140 2.1.14 LayoutMdi方法——排列子窗体 141 2.1.15 Load事件——窗体加载事件 141 2.1.16 MaximizeBox属性——是否显示最大化按钮 142 2.1.17 Maximum属性——设置数字显示框的最大值 142 2.1.18 MDI窗体——多文档界面 143 2.1.19 MdiChildren属性——获取子窗体的数组 146 2.1.20 MdiParent属性——设置父窗体 147 2.1.21 MinimizeBox属性——是否显示最小化按钮 147 2.1.22 Minimum属性——数字显示框的最小值 148 2.1.23 Opacity属性——设置窗体的透明度级别 148 2.1.24 Owner属性——设置窗体所有者 149 2.1.25 StartPosition属性——设置窗体起始位置 150 2.1.26 StartupPath 属性——获取可执行文件路径 150 2.1.27 TopMost属性——窗体是否应显示为最顶层窗体 151 2.1.28 WindowState属性——窗体的窗口状态 151 2.2 文本类控件 152 2.2.1 AllowEdit属性——是否可以编辑列表项 152 2.2.2 AppendText方法——追加文本 152 2.2.3 BeginEdit方法——将单元格置于编辑模式下 153 2.2.4 Button控件——按钮控件 153 2.2.5 CancelEdit属性——取消更改 155 2.2.6 CanPaste方法——是否可以粘贴数据 155 2.2.7 CanRedo属性——是否有可以重新应用的操作 156 2.2.8 CanSelect属性——是否可以选控件 157 2.2.9 CanUndo属性——能否撤销上一个操作 157 2.2.10 Cut方法——将选定内容移动到“剪贴板” 158 2.2.11 Find方法——搜索指定的项目 158 2.2.12 FindString方法——搜索文本 160 2.2.13 Label控件——标签控件 161 2.2.14 LabelEdit属性——允许用户编辑控件数据 163 2.2.15 LinkLabel控件——以超链接形式显示文本 164 2.2.16 MaskedTextBox控件——使用掩码区分用户输入 166 2.2.17 Multiline属性——是否为多行输入数据 169 2.2.18 PasswordChar属性——取代用户输入而显示的字符 170 2.2.19 Redo方法——重新应用控件上次撤销的操作 171 2.2.20 RichTextBox控件——有格式文本控件 171 2.2.21 Select方法——激活控件 173 2.2.22 SelectAll方法——选定所有文本 176 2.2.23 Selected属性——是否选定 176 2.2.24 SelectedCells属性——用户选定的单元格集合 177 2.2.25 SelectedColumns属性——用户选定的列集合 178 2.2.26 SelectedRows属性——用户选定的行集合 179 2.2.27 SelectionBackColor属性——文本在选时的颜色 180 2.2.28 SelectionColor属性——插入点的文本颜色 180 2.2.29 SelectionEnd属性——设置选定日期范围的结束日期 181 2.2.30 SelectionFont属性——选定文本或插入点的字体 182 2.2.31 SelectionIndent属性——所选内容开始行的缩进距离 183 2.2.32 SelectionLength属性——控件选定的字符数 184 2.2.33 SelectionRange 属性——设置选定的日期范围 185 2.2.34 SelectionStart属性——选择的起始位置的字符索引 185 2.2.35 TextBox控件——输入或显示文本 186 2.2.36 TextChanged事件——Text属性值更改时发生 187 2.3 选择类控件 188 2.3.1 CheckBox控件——复选框控件 188 2.3.2 CheckBoxes属性——是否显示复选框 190 2.3.3 Checked属性——复选框是否处于选状态 190 2.3.4 CheckedChanged事件——Checked属性更改时发生 191 2.3.5 CheckedListBox控件——复选框列表控件 191 2.3.6 CheckState属性——设置CheckBox控件的状态 193 2.3.7 ComboBox控件——下拉组合框控件 194 2.3.8 DomainUpDown控件——上下选择控件 195 2.3.9 DropDownStyle属性——指定组合框样式的值 197 2.3.10 GetItemCheckState方法——当前项的复选状态的值 198 2.3.11 GetItemText方法——指定项的文本表示形式 199 2.3.12 Index属性——从零开始的索引 200 2.3.13 Items属性——数组列表对象的项的集合 200 2.3.14 ListBox控件——列表控件 201 2.3.15 ListView控件——显示带图标的项列表 205 2.3.16 NumericUpDown控件——数值选择控件 208 2.3.17 RadioButton控件——单选按钮 210 2.3.18 SelectedIndex属性——获取选择项的索引 212 2.3.19 SelectedIndices属性——表示当前选的项 213 2.3.20 SelectedItem属性——当前选的项 214 2.3.21 SelectedItems属性——选定项的集合 215 2.3.22 SelectedText属性——选定文本 216 2.4 容器类控件 217 2.4.1 FlatStyle属性——设置控件的平面样式外观 217 2.4.2 FlowDirection属性——指示FlowLayoutPanel控件的流向 217 2.4.3 FlowLayoutPanel控件——水平或垂直排列内容 218 2.4.4 GroupBox控件——分组控件 219 2.4.5 Panel控件——容器控件 220 2.4.6 TabControl控件——选项卡控件 222 2.4.7 TabIndex属性——控件的Tab键顺序 224 2.4.8 TabPages属性——选项卡页的集合 224 第3章 Windows高级控件 226 3.1 日期时间类控件 226 3.1.1 CalendarFont属性——日历的字体样式 226 3.1.2 CalendarForeColor属性——日历的前景色 226 3.1.3 DateTimePicker控件——日期和日历的组合 226 3.1.4 MaxDate属性——最大日期和时间 228 3.1.5 MinDate属性——最小日期和时间 228 3.1.6 MonthCalendar控件——以网格形式显示日历 229 3.1.7 SetDate方法——将日期设置为当前选定的日期 231 3.1.8 ShowToday属性——是否显示当前日期 232 3.2 对话框、菜单、工具栏及状态栏控件 232 3.2.1 ColorDialog控件——颜色对话框 232 3.2.2 ContextMenuStrip控件——右键快捷菜单 233 3.2.3 ExpandAll方法——展开所有树节点 233 3.2.4 Filter属性——设置筛选器字符串 234 3.2.5 FolderBrowserDialog控件——浏览文件夹对话框 234 3.2.6 Font属性——设置字体 235 3.2.7 FontDialog控件——字体对话框 235 3.2.8 InitialDirectory属性——文件对话框显示的初始目录 237 3.2.9 MenuStrip控件——菜单控件 238 3.2.10 Nodes属性——树节点集合 241 3.2.11 OpenFileDialog控件——打开文件对话框 241 3.2.12 RestoreDirectory属性——是否还原当前目录 244 3.2.13 RootFolder属性——设置浏览的根文件夹 245 3.2.14 SaveFileDialog组件——保存文件对话框 246 3.2.15 SelectedNode属性——获取选定的树节点 248 3.2.16 SelectedPath属性——用户选定的路径 249 3.2.17 ShowDialog方法——打开模式对话框 249 3.2.18 ToolStrip控件——工具栏控件 251 3.2.19 TreeNode类——树节点 252 3.2.20 TreeView控件——树控件 254 3.3 数据绑定类控件 256 3.3.1 BindingNavigator控件——导航和操作数据 256 3.3.2 Cell对象——表示Word文档的单元格 258 3.3.3 CellClick事件——单元格的任何部分被单击时发生 259 3.3.4 CellEnter事件——控件接收到输入焦点时发生 260 3.3.5 CellMouseClick事件——鼠标单击单元格时发生 261 3.3.6 CellLeave事件——单元格失去输入焦点时发生 261 3.3.7 Cells属性——Bookmark控件的表单元格 261 3.3.8 ColumnCount属性——DataGridView控件显示的列数 262 3.3.9 Columns属性——控件所有列的集合 262 3.3.10 ColumnWidth属性——ListBox列的宽度 263 3.3.11 CurrentCell属性——设置当前处于活动状态的单元格 263 3.3.12 CurrentRow属性——包含当前单元格的行 263 3.3.13 DataGridView控件——数据控件 264 3.3.14 FullRowSelect属性——是否选择其所有子项 268 3.3.15 GetCellCount方法——获取满足筛选器的单元格数目 269 3.3.16 GetColumn方法——指定子控件的列位置 270 3.3.17 NewRow方法——添加一条新记录 270 3.3.18 RowCount方法——DataGridView显示的行数 271 3.3.19 Rows属性——DataGridView控件的所有行 272 3.4 打印类控件 273 3.4.1 CrystalReportViewer控件——水晶报表查看控件 273 3.4.2 Document属性——设置要预览的文档 280 3.4.3 PageSetupDialog组件——配置页面的对话框 281 3.4.4 Print方法——打印当前页面 283 3.4.5 PrintDialog组件——打印对话框 283 3.4.6 PrintDocument组件——设置打印的文档 286 3.4.7 PrinterSettings属性——打印机设置 291 3.4.8 PrintPage事件——当需要为当前页打印的输出时发生 292 3.4.9 PrintPreviewControl组件——按文档打印时的外观显示Print Document组件 292 3.4.10 PrintPreviewDialog组件——显示PrintDocument组件在打印时的外观 295 3.4.11 PrinterSettings类——用来指定有关文档打印方式的信息 297 3.4.12 Zoom属性——指示页面的显示大小 300 3.5 其他常用组件 300 3.5.1 BackgroundWorker组件——在主线程的另一线程上异步执行耗时的操作 300 3.5.2 ErrorProvider控件——检查并显示错误信息 302 3.5.3 EventLog组件——连接本地和远程计算机的事件日志 303 3.5.4 HelpProvider组件——将帮助文件与Windows应用程序相关联 306 3.5.5 HScrollBar控件——一个标准Windows水平滚动条 309 3.5.6 Image属性——显示在控件上的图像 311 3.5.7 ImageAlign属性——在控件显示的图像的对齐方式 312 3.5.8 ImageFormat类——指定图像的格式 312 3.5.9 ImageList组件——用于存储图像 314 3.5.10 ImageList属性——在控件显示的图像的ImageList 316 3.5.11 Interval属性——设置Timer控件执行的间隔 317 3.5.12 NotifyIcon控件——设置程序的系统托盘图标 317 3.5.13 PerformStep方法——按照Step属性的数量增加进度栏的当前位置 319 3.5.14 PictrueBox控件——用于显示指定的图像 320 3.5.15 Play方法——播放.wav文件 323 3.5.16 ProgressBar控件——进度条 323 3.5.17 SetError方法——设置错误信息 326 3.5.18 SetShowHelp方法——是否显示帮助信息 327 3.5.19 SetToolTip方法——设置提示文本 328 3.5.20 Step属性——增加进度条的当前位置时所根据的数量 328 3.5.21 Stop方法——停止加载网页 329 3.5.22 Tick事件——计时器处于启用状态时发生 330 3.5.23 Timer组件——定期引发事件的组件 330 3.5.24 ToolTip控件——显示提示信息 332 3.5.25 ToolTipIcon属性——提示文本旁显示的图标类型 333 3.5.26 ToolTipText属性——ToolTip显示的文本 334 3.5.27 ToolTipTitle属性——工具提示窗口的标题 334 3.5.28 TrackBar控件——标准的Windows跟踪条 335 3.5.29 Url属性——引用服务说明的URL 337 3.5.30 VscrollBar控件——标准的Windows垂直滚动条 337 3.5.31 WebBrowser控件——在窗体显示网页 339 3.5.32 Windows Media Player控件——播放常见的音频文件 343 第4章 控件公共属性、方法及事件 347 4.1 控件公共属性 347 4.1.1 BackColor属性——设置控件的背景色 347 4.1.2 BackgroudColor属性——设置控件背景色 347 4.1.3 BackgroudImage属性——设置控件背景图像 347 4.1.4 Border属性——控件边框 348 4.1.5 BorderStyle属性——控件的边框样式 349 4.1.6 Bottom属性——控件下边缘与其容器的工作区上边缘之间的距离 349 4.1.7 CanFocus属性——控件是否可以接收焦点 350 4.1.8 Capture属性——控件是否已捕获鼠标 350 4.1.9 Color属性——设置用户选定的颜色 350 4.1.10 Dock属性——控件在窗体的布局样式 351 4.1.11 Enabled属性——控件是否可用 352 4.1.12 ForeColor属性——设置控件的前景色 352 4.1.13 Handle属性——获取控件绑定到的窗口句柄 352 4.1.14 Height属性——设置控件的高度 353 4.1.15 KeyChar属性——设置与按下的键对应的字符 354 4.1.16 KeyValue属性——获取KeyDown或KeyUp事件的键盘值 355 4.1.17 Lines属性——设置多行配置的文本行 355 4.1.18 Location属性——控件的左上角相对于其容器的左上角的坐标 356 4.1.19 Name属性——控件或实例的名称 356 4.1.20 Parent属性——设置控件的父容器或获取指定子目录的父目录 357 4.1.21 Position属性——设置坐标 358 4.1.22 ReadOnly属性——是否只读 359 4.1.23 Right属性——控件右边缘与其容器的工作区左边缘之间的距离 359 4.1.24 RightToLeft属性——控件的文本从右向左读取 360 4.1.25 ScrollBars属性——滚动条的可见性和位置 360 4.1.26 SizeMode属性——指示如何显示图像 361 4.1.27 Tag属性——窗体或控件的标识 362 4.1.28 Text属性——与控件关联的文本 362 4.1.29 TextAlign 属性——控件上文本的对齐方式 363 4.1.30 Top属性——控件上边缘与其容器的工作区上边缘之间的距离 364 4.1.31 Value属性——辅助性对象的值 364 4.1.32 View属性——项在控件的显示方式 365 4.1.33 Visible属性——控件是否可见 366 4.1.34 Width属性——控件的宽度 366 4.2 控件公共方法 367 4.2.1 BringToFront方法——将控件带到Z顺序的前面 367 4.2.2 Focus方法——为控件设置输入焦点 367 4.2.3 GetClipboardContent方法——检索选定单元格内容的格式化值 368 4.2.4 GetParent方法——检索指定路径的父目录 368 4.2.5 Hide方法——隐藏窗体 369 4.2.6 Load方法——加载XML文档 369 4.2.7 LoadFile方法——将文件加载到RichTextBox控件 371 4.2.8 Navigate方法——打开指定的URL地址 372 4.2.9 Refresh方法——重新加载当前的网页 373 4.2.10 SaveAs方法——用新名称或新格式保存文档 373 4.2.11 SaveFile方法——将内容保存到文件 374 4.2.12 Show方法——显示光标或者打开新窗体 375 4.2.13 UpButton方法——按照指定数值递增 376 4.3 控件公共事件 377 4.3.1 Click事件——单击控件时触发该事件 377 4.3.2 Enter事件——光标进入控件时发生 378 4.3.3 KeyDown事件——控件有焦点按下键时发生 378 4.3.4 KeyPress事件——控件有焦点按下键时发生 380 4.3.5 KeyUp事件——控件有焦点释放键时发生 381 4.3.6 Leave事件——输入焦点离开控件时发生 381 4.3.7 MouseClick事件——用户单击控件时发生 382 4.3.8 Navigated事件——加载新文档时发生 383 4.3.9 Paint事件——重绘或更新控件时发生 383 第5章 数据库开发 385 5.1 SQL语言基础 385 5.1.1 AVG聚合函数——返回组值的平均值 385 5.1.2 CAST函数——数据类型显式转换 385 5.1.3 COUNT函数——返回组的项的数量 386 5.1.4 Last函数——返回查询结果的最后一个记录 386 5.1.5 MAX函数——返回表达式的最大值 388 5.1.6 MIN函数——返回表达式的最小值 388 5.1.7 newid函数——创建uniqueidentifier类型的惟一值 389 5.1.8 SUM函数——返回表达式所有值的和 389 5.1.9 UPDATE语句——更改表的现有数据 390 5.2 ADO.NET技术 392 5.2.1 Command对象——对数据源执行增、删、改、查操作 392 5.2.2 CommandText属性——获取设置SQL语句或存储过程 393 5.2.3 CommandTimeout属性——获取或设置错误等待时间 393 5.2.4 CommandType属性——获取或设置如何解释CommandText属性 394 5.2.5 Connection对象——数据库连接对象 394 5.2.6 ConnectionState枚举——数据库连接状态 395 5.2.7 DataAdapter类——数据库桥接器 396 5.2.8 DataMember属性——获取或设置数据源列表或表名称 398 5.2.9 DataReader类——只读数据集 398 5.2.10 DataSet类——数据集 400 5.2.11 DataSource属性——获取或设置数据源 402 5.2.12 ExecuteNonQuery方法——执行SQL语句并返回受影响的行数 402 5.2.13 ExecuteReader方法——执行SQL语句并返回DataReader对象 403 5.2.14 ExecuteScalar方法——执行SQL语句并返回结果集第1行的第1列 404 5.2.15 Fill方法——填充数据集 405 5.2.16 Merge方法——合并数据集 407 5.2.17 Parameters属性——获取SqlParameterCollection 409 5.2.18 ReadXml方法——将XML架构和数据读入数据集 410 5.2.19 SelectCommand属性——获取或设置选择记录命令 411 5.2.20 SQL注入式攻击——利用设计上的漏洞攻击SQL 412 5.2.21 SqlCommand类——SQL执行命令 413 5.2.22 SqlConnection类——SQL数据库连接对象 415 5.2.23 SqlDataAdapter类——SQL数据库桥接器 416 5.2.24 SqlDataReader类——SQL只读数据集 418 5.2.25 Tables属性——获取包含在数据集的表的集合 421 5.2.26 Update方法——使控件重绘工作区内的无效区域 422 5.2.27 UpdateCommand属性——获取或设置更新记录命令 423 5.2.28 WriteXml方法——将数据集数据写入到XML 423 5.3 LINQ技术 424 5.3.1 Lambda表达式——匿名函数 424 5.3.2 LINQ技术——语言集成查询 426 5.3.3 LinqToDataSet技术——LINQ操作数据集 427 5.3.4 LinqToObjects技术——LINQ操作数组和集合 429 5.3.5 LinqToSql技术——LINQ操作SQL数据库 431 5.3.6 LinqToXml技术——LINQ操作XML文件 436 5.3.7 var关键字——根据初始化语句推断变量类型 439 第6章 文件、数据流与注册表 441 6.1 文件与I/O数据流 441 6.1.1 ASCII码——键盘的一种表示方式 441 6.1.2 ASCIIEncoding类——ASCII字符编码的操作类 442 6.1.3 Attributes属性——获取和设置文件的属性 443 6.1.4 BinaryReader类——将特定的数据读作二进制值 445 6.1.5 BinaryWriter类——将二进制值写入到流 447 6.1.6 CanRead属性——判断当前流是否支持读写 448 6.1.7 Close方法——释放所有关联的资源 449 6.1.8 Copy方法——文件的复制 450 6.1.9 CopyFile方法——将文件复制到新的位置 451 6.1.10 CopyTo方法——将指定的字符串复制到字符数组 452 6.1.11 Create方法——创建文件 455 6.1.12 CreateDirectory方法——创建指定路径的所有目录 456 6.1.13 CreateText方法——创建或打开文本文件 456 6.1.14 CreationTime属性——获取或设置文件的创建时间 457 6.1.15 CryptoStream类——将数据流连接到加密转换的流 457 6.1.16 Delete方法——删除文件 461 6.1.17 Directory类——对文件夹进行操作的类 463 6.1.18 DirectoryEntry类——封装节点或对象 464 6.1.19 DirectoryInfo类——对文件夹进行操作的类 466 6.1.20 DirectoryName属性——获取路径 468 6.1.21 DirectorySearcher组件——执行查找 468 6.1.22 DriveInfo类——驱动器的信息访问 469 6.1.23 Encoding属性——获取编码方式 470 6.1.24 Exists方法——判断文件是否存在 471 6.1.25 Exists属性——判断文件是否存在 472 6.1.26 Extension属性——获取文件扩展名 473 6.1.27 File类——对文件进行操作的类 473 6.1.28 FileAttributes枚举——提供文件和目录的属性 475 6.1.29 FileInfo类——文件的操作类 476 6.1.30 FileName属性——获取或设置文件的名称 478 6.1.31 FileStream类——对文件流操作的类 478 6.1.32 Flush方法——清除流的缓冲区 480 6.1.33 GetBytes方法——将字符串编码设为字节序列 481 6.1.34 GetDirectories方法——获取子目录的名称 482 6.1.35 GetExtension方法——获取路径字符串的扩展名 485 6.1.36 GetFiles方法——获取目录的文件名称 486 6.1.37 GetFileSystemEntries方法——获取目录的所有名称 487 6.1.38 GetFileSystemInfos方法——获取所有文件的信息 489 6.1.39 GetStream方法——返回用于发送和接收的数据 491 6.1.40 GetString方法——将字节解码成字符串 491 6.1.41 HasRows属性——指示 OleDbDataReader是否有数据 493 6.1.42 MD5CryptoServiceProvider类——操作MD5的类 493 6.1.43 MemoryStream类——创建其支持存储区为内存的流 495 6.1.44 Move方法——文件的移动 497 6.1.45 MoveNext方法——移动到下一个字符 497 6.1.46 MoveTo方法——文件的移动 498 6.1.47 NetworkStream类——网络访问的基础数据流 500 6.1.48 Open方法——打开文件 502 6.1.49 OpenFile方法——以只读方式打开文件 503 6.1.50 OpenText方法——打开UTF-8编码文本文件 504 6.1.51 Path属性——监视的目录的路径 505 6.1.52 Peek方法——返回下一个可用的字符 506 6.1.53 Read方法——读取数据流 507 6.1.54 ReadBytes方法——将指定的字节读入字节数组 508 6.1.55 ReadToEnd方法——从流的当前位置读到末尾 509 6.1.56 Stream类——对数据流进行操作的类 510 6.1.57 StreamReader类——数据流的读取类 512 6.1.58 StreamWriter类——数据流的写入类 513 6.1.59 TextReader类——读取连续字符的读取器 515 6.1.60 TextWriter类——编写一个有序字符系列的编写器 516 6.1.61 Write方法——将流写入到文件 517 6.2 注册表技术 521 6.2.1 CreateSubKey方法——创建或打开子项 521 6.2.2 GetValue方法——获取注册表项的值 522 6.2.3 GetValueNames方法——所有值名称的字符串数组 523 6.2.4 GetSubKeyNames方法——所有子项名称字符串数组 525 6.2.5 OpenSubKey方法——以只读方式检索子项 525 6.2.6 Registry类——注册表操作类 528 6.2.7 RegistryKey类——表示Windows注册表的项级节点 529 6.2.8 SetValue方法——设置注册表项的指定名称/值对 531 第7章 GDI+绘图技术 532 7.1 GDI+绘图基础 532 7.1.1 Bitmap类——图像对象 532 7.1.2 Cursor类——绘制光标指针图像 533 7.1.3 GDI+——图形图像的绘制 535 7.1.4 Graphics类——绘图类 536 7.1.5 GraphicsPath类——一系列相互连接的直线和曲线 540 7.1.6 Icon类——图标的操作类 542 7.1.7 Image类——图像的操作类 543 7.1.8 LinearGradientBrush类——线性渐变封装Brush 545 7.1.9 Region类——由矩形和路径构成的图形形状的内部 547 7.1.10 SolidBrush类——定义单色画笔 548 7.2 常用绘图方法 549 7.2.1 Draw方法——绘制光标 549 7.2.2 DrawArc方法——绘制圆弧 550 7.2.3 DrawBezier方法——绘制贝塞尔样条 551 7.2.4 DrawEllipse方法——绘制椭圆 553 7.2.5 DrawImage方法——绘制Image图像 555 7.2.6 DrawLine方法——绘制直线 556 7.2.7 DrawPath方法——绘制GraphicsPath图形路径 558 7.2.8 DrawPie方法——绘制扇形 558 7.2.9 DrawPolygon方法——绘制多边形 560 7.2.10 DrawRectangle方法——绘制矩形 561 7.2.11 DrawString方法——绘制文本字符串 562 7.3 常用填充图像方法 565 7.3.1 FillEllipse方法——填充椭圆 565 7.3.2 FillPath方法——填充GraphicsPath的内部 566 7.3.3 FillPie方法——填充扇形 567 7.3.4 FillPolygon方法——填充多边形 568 7.3.5 FillRectangle方法——填充矩形框 570 7.3.6 FillRegion方法——填充一个区域 572 7.4 其他常用方法 572 7.4.1 Clone方法——创建Bitmap对象的某个部分的副本 572 7.4.2 CreateGraphics方法——创建Graphics对象 574 7.4.3 FromArgb方法——从ARGB值创建Color结构 574 7.4.4 FromFile方法——从指定的文件创建Image 577 7.4.5 FromImage方法——从Image创建新的Graphics对象 578 7.4.6 FromStream方法——数据流创建Image 578 7.4.7 GetPixel方法——获取图像的像素颜色 580 7.4.8 GetThumbnailImage方法——Image的缩略图 581 7.4.9 Save方法——将图片以文件的形式进行复制 583 7.4.10 SetPixel方法——设置图像的像素颜色 583 7.4.11 Transform方法——对路径的数据点进行变换 584 第8章 C#高级编程 586 8.1 网络编程技术 586 8.1.1 Accept方法——为新建连接创建新的Socket对象 586 8.1.2 AcceptSocket方法——接收挂起的连接请求 586 8.1.3 BeginConnect方法——开始远程主机连接的异步请求 587 8.1.4 Dns类——从Internet域名系统检索特定主机的信息 588 8.1.5 GetHostAddresses方法——返回主机的IP地址 589 8.1.6 GetHostByAddress方法——创建IPHostEntry实例 590 8.1.7 GetHostByName方法——获取指定DNS主机名的信息 591 8.1.8 GetHostName方法——获取本地计算机的主机名 592 8.1.9 IPEndPoint类——将网络端点表示为IP地址和端口号 592 8.1.10 IPHostEntry类——为主机地址信息提供容器类 594 8.1.11 Listen方法——将Socket置于侦听状态 596 8.1.12 MachineName属性——读取或写入事件的计算机名称 596 8.1.13 MailMessage类——邮件的操作类 597 8.1.14 Net send命令——用net send命令进行发送 598 8.1.15 Net use命令——实现映射网络驱动器 599 8.1.16 Ping类——网络访问远程计算机的操作类 601 8.1.17 POP3协议——POP邮件的操作类 603 8.1.18 Receive方法——由远程主机发送的UDP数据报 608 8.1.19 Send方法——将数据发送到连接的Socket 609 8.1.20 SerialPort类——控制串行端口文件资源 610 8.1.21 SMTP协议——进行邮件的传输 612 8.1.22 SmtpClient类——将电子邮件发送到SMTP服务器 614 8.1.23 Socket类——网络通信的操作类 616 8.1.24 TcpClient类——为TCP网络服务提供客户端连接 618 8.1.25 TcpListener类——从TCP网络客户端侦听连接 619 8.1.26 UdpClient类——用户数据报(UDP)网络服务 620 8.1.27 WebClient类——URI标识的资源发送和接收 623 8.1.28 WebRequest类——访问Internet数据 625 8.1.29 WebResponse类——协议特定的响应类 629 8.2 多线程编程 630 8.2.1 Abort方法——终止线程 630 8.2.2 BeginInvoke方法——线程上异步执行委托 631 8.2.3 EndInvoke方法——异步操作的返回值 632 8.2.4 Join方法——确保线程已终止 633 8.2.5 Kill方法——强制关闭进程 633 8.2.6 Process类——对正在计算机上运行的进程的访问 635 8.2.7 Sleep方法——线程挂起 640 8.2.8 Start方法——启动进程 640 8.2.9 Thread类——创建并控制线程的类 642 8.2.10 ThreadState属性——获取当前线程的状态 645 8.3 WMI技术——系统管理 646 8.3.1 MainWindowTitle属性——获取进程的主窗口标题 646 8.3.2 ManagementClass类——公共信息模型管理类 647 8.3.3 ManagementObject类——表示WMI实例 648 8.3.4 ManagementObjectSearcher类——查询检索管理对象 650 8.3.5 ManagementScope类——管理操作的范围 651 8.3.6 Microsoft.Win32命名空间——操作注册表类 652 8.3.7 WndProc方法——处理Windows消息 654 8.4 其他高级技术 655 8.4.1 Children属性——获取节点的子项 655 8.4.2 COM+服务——为类的实例提供服务 655 8.4.3 DirectShow技术——流媒体处理的一个开发包 656 8.4.4 DLL组件——动态链接库 663 8.4.5 MVC开发模式——模型视图控制器 664 8.4.6 VFW技术——视频应用程序提供的软件工具包 666 8.4.7 XML——定义其他标识语言的元标识语言 668 8.4.8 XmlReader类——XML读取器 670 8.4.9 XmlWriter类——XML编写器 673 附录——字母索引 676

110,529

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧