[C#][SAMPLE][CODE][Control]TextBox和Validating事件的相关处理
[示例出处]:本示例来自《C#入门经典》第三版中文版,P342-P348
[示例涉及]:
1、TextBox控件的基本使用
2、Validating事件的使用
3、多委托处理同一事件方法
[示例代码]:2文件(其余默认)
Form1.Designer.cs
Form1.cs
[示例说明]:
1、开发语言:C#
2、开发环境:Visual Studio.Net 2005 Team suite
3、开发模板:C#.net项目->Windows应用程序
[示例涉及]:
1、TextBox控件的基本使用
2、Validating事件的使用
3、多委托处理同一事件方法
[示例代码]:2文件(其余默认)
Form1.Designer.cs
1
namespace WA_TextBoxTest
2
{
3
partial class Form1
4
{
5
/// <summary>
6
/// 必需的设计器变量。
7
/// </summary>
8
private System.ComponentModel.IContainer components = null;
9![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
10
/// <summary>
11
/// 清理所有正在使用的资源。
12
/// </summary>
13
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
14
protected override void Dispose(bool disposing)
15
{
16
if (disposing && (components != null))
17
{
18
components.Dispose();
19
}
20
base.Dispose(disposing);
21
}
22![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
23
Windows 窗体设计器生成的代码
192![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
193
private System.Windows.Forms.Label label1;
194
private System.Windows.Forms.Label label2;
195
private System.Windows.Forms.TextBox textBoxName;
196
private System.Windows.Forms.TextBox textBoxAddress;
197
private System.Windows.Forms.TextBox textBoxOccupation;
198
private System.Windows.Forms.TextBox textBoxAge;
199
private System.Windows.Forms.TextBox textBoxOutput;
200
private System.Windows.Forms.Label label3;
201
private System.Windows.Forms.Label label4;
202
private System.Windows.Forms.Label label5;
203
private System.Windows.Forms.Button buttonOK;
204
private System.Windows.Forms.Button buttonHelp;
205
}
206
}
207![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
208![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
2
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
3
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
4
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
5
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
6
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
7
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
8
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
9
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
10
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
11
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
12
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
13
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
14
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
15
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
16
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
17
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
18
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
19
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
20
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
21
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
22
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
23
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
192
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
193
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
194
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
195
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
196
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
197
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
198
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
199
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
200
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
201
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
202
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
203
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
204
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
205
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
206
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif)
207
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
208
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
Form1.cs
1
using System;
2
using System.Collections.Generic;
3
using System.ComponentModel;
4
using System.Data;
5
using System.Drawing;
6
using System.Text;
7
using System.Windows.Forms;
8![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
9
namespace WA_TextBoxTest
10
{
11
public partial class Form1 : Form
12
{
13
public Form1()
14
{
15
InitializeComponent();
16
this.buttonOK.Enabled = false;
17![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
18
//Tag values for testing if the data is valid.
19
this.textBoxName.Tag = false;
20
this.textBoxAddress.Tag = false;
21
this.textBoxAge.Tag = false;
22
this.textBoxOccupation.Tag = false;
23![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
24
//订阅事件Subscriptions to events
25
this.textBoxName.Validating += new CancelEventHandler(this.textBoxEmpty_Validating);
26
this.textBoxAddress.Validating += new CancelEventHandler(this.textBoxEmpty_Validating);
27
this.textBoxOccupation.Validating += new CancelEventHandler(this.textBoxOccupation_Validating);
28
this.textBoxAge.Validating += new CancelEventHandler(this.textBoxEmpty_Validating);
29![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
30
//当控件中文本发生改变,就激发TextChanged事件。
31
this.textBoxName.TextChanged +=new EventHandler(textBox_TextChanged);
32
this.textBoxAddress.TextChanged+=new EventHandler(textBox_TextChanged);
33
this.textBoxOccupation.TextChanged+=new EventHandler(textBox_TextChanged);
34
this.textBoxAge.TextChanged += new EventHandler(textBox_TextChanged);
35
}
36![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
37
private void buttonOK_Click(object sender, EventArgs e)
38
{
39
//No testing for invalid values are made ,as that should not be necessary
40
string output;
41
42
//Concatenate the text values of for TextBoxes.
43
output = "Name:" + this.textBoxName.Text + "\r\n";
44
output += "Address:" + this.textBoxAddress.Text + "\r\n";
45
output += "Occupation:" + this.textBoxOccupation.Text + "\r\n";
46
output += "Age:" + this.textBoxAge.Text;
47
48
//Insert the new text.
49
this.textBoxOutput.Text = output;
50
}
51![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
52
private void buttonHelp_Click(object sender, EventArgs e)
53
{
54
//Write a short description of each TextBox in the Output TextBox.
55
string output;
56![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
57
output = "Name=Your name\r\n";
58
output += "Address=Your address\r\n";
59
output += "Occupation=Only allowed value is 'Programmer'\r\n";
60
output += "Age=Your age";
61![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
62
//Insert the new text.
63
this.textBoxOutput.Text = output;
64
}
65![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
66
private void textBoxEmpty_Validating(object sender, CancelEventArgs e)
67
{
68
//我们知道这个sender是一个对话框,所以我们将他们强制转换为TextBox
69
TextBox tb = (TextBox)sender;
70![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
71
//如果对话框是空的话我们设置TextBox背景色为红色来象征问题。
72
//如果控件有valid信息,我们就使用控件的Tag值来指出。
73
if (tb.Text.Length == 0)
74
{
75
tb.BackColor = Color.Red;
76
tb.Tag = false;
77
//在这个例子中我们不想取消further processing
78
//但是如果我们想要这么做的话,我们只需要添加以下一行:
79
//e.Cancel=true;
80
}
81
else
82
{
83
this.BackColor = SystemColors.Window;
84
tb.Tag = true;
85
}
86
//Finally ,we call ValidateOK which will set the value of the OK button.
87
ValidateOK();
88
}
89![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
90
private void textBoxOccupation_Validating(object sender, CancelEventArgs e)
91
{
92
//Cast the sender object to a textBox
93
TextBox tb = (TextBox)sender;
94
95
//Check if the values are correct
96
if (tb.Text.CompareTo("Programmer") == 0 || tb.Text.Length == 0)
97
{
98
tb.Tag = true;
99
tb.BackColor = Color.Red;
100
}
101
else
102
{
103
tb.Tag = false;
104
tb.BackColor = SystemColors.Window;
105
}
106![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
107
//Set the state of the OK button
108
ValidateOK();
109
}
110![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
111
private void textBoxAge_KeyPress(object sender, KeyPressEventArgs e)
112
{
113
if ((e.KeyChar < 48 || e.KeyChar > 57) && e.KeyChar != 8)
114
{
115
e.Handled = true; //Remove the character
116
//等于true告诉用户不应该对字符进行任何操作
117
}
118
}
119![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
120
private void textBox_TextChanged(object sender, EventArgs e)
121
{
122
//Cast the sender object to a TextBox
123
TextBox tb = (TextBox)sender;
124![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
125
//Test if the data is valid and set the tag and back ground color accordingly.
126
if (tb.Text.Length == 0 && tb != textBoxOccupation)
127
{
128
tb.Tag = false;
129
tb.BackColor = Color.Red;
130
}
131
else if (tb == textBoxOccupation && (tb.Text.Length != 0 && tb.Text.CompareTo("Programmer") != 0))
132
{
133
//Don't set the color here,as it will color change while the user is typing
134
tb.Tag = false;
135
}
136
else
137
{
138
tb.Tag = true;
139
tb.BackColor = SystemColors.Window;
140
}
141![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
142
//Call ValidateOK to set the OK button
143
ValidateOK();
144
}
145![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
146
private void ValidateOK()
147
{
148
//Set the OK button to enabled if all the Tags are true
149
this.buttonOK.Enabled = ((bool)(this.textBoxName.Tag) &&
150
(bool)(this.textBoxAge.Tag) &&
151
(bool)(this.textBoxAddress.Tag) &&
152
(bool)(this.textBoxOccupation.Tag));
153
}
154
}
155
}
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
2
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
3
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
4
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
5
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
6
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
7
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
8
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
9
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
10
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
11
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
12
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
13
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
14
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
15
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
16
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
17
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
18
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
19
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
20
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
21
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
22
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
23
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
24
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
25
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
26
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
27
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
28
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
29
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
30
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
31
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
32
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
33
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
34
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
35
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
36
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
37
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
38
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
39
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
40
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
41
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
42
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
43
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
44
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
45
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
46
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
47
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
48
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
49
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
50
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
51
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
52
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
53
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
54
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
55
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
56
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
57
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
58
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
59
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
60
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
61
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
62
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
63
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
64
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
65
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
66
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
67
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
68
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
69
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
70
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
71
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
72
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
73
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
74
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
75
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
76
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
77
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
78
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
79
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
80
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
81
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
82
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
83
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
84
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
85
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
86
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
87
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
88
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
89
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
90
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
91
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
92
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
93
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
94
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
95
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
96
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
97
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
98
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
99
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
100
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
101
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
102
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
103
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
104
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
105
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
106
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
107
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
108
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
109
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
110
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
111
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
112
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
113
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
114
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
115
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
116
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
117
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
118
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
119
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
120
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
121
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
122
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
123
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
124
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
125
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
126
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
127
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
128
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
129
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
130
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
131
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
132
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
133
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
134
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
135
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
136
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
137
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
138
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
139
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
140
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
141
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
142
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
143
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
144
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
145
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
146
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
147
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
148
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
149
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
150
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
151
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
152
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
153
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
154
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
155
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif)
[示例说明]:
1、开发语言:C#
2、开发环境:Visual Studio.Net 2005 Team suite
3、开发模板:C#.net项目->Windows应用程序
posted on 2006-11-27 21:52 volnet(可以叫我大V) 阅读(2872) 评论(0) 编辑 收藏 举报