手机站
网通分站
电信主站
密 码:
用户名:
当前位置 : 主页>程序设计>C/C++>列表

radiobox、checkbox和validating事件的相关处理 _c#应用

来源:互联网 作者:west263.com 时间:2008-02-23
西部数码-全国虚拟主机10强!40余项虚拟主机管理功能,全国领先!双线多线虚拟主机南北访问畅通无阻!免费赠送企业邮局,.CN域名,自助建站480元起,免费试用7天,满意再付款! P4主机租用799元/月.月付免压金!

[示例出处]:本示例来自《C#入门经典》第三版中文版,P349-P353
[示例涉及]:
1、RadioBox、CheckBox控件的基本使用
2、Validating事件的使用(同[C#][SAMPLE][CODE][Control]TextBox和Validating事件的相关处理 )
3、多委托处理同一事件方法(同[C#][SAMPLE][CODE][Control]TextBox和Validating事件的相关处理 )
[示例代码]:2文档(其余默认)

Form1.Designer.cs
1namespace WA_TextBoxTest
2{
3 partial class Form1
4 {
5 /**//// <summary>
6 /// 必需的设计器变量。
7 /// </summary>
8 private System.ComponentModel.IContainer components = null;
9
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
23 Windows 窗体设计器生成的代码#region Windows 窗体设计器生成的代码
24
25 /**//// <summary>
26 /// 设计器支持所需的方法 - 不要
27 /// 使用代码编辑器修改此方法的内容。
28 /// </summary>
29 private void InitializeComponent()
30 {
31 this.label1 = new System.Windows.Forms.Label();
32 this.label2 = new System.Windows.Forms.Label();
33 this.textBoxName = new System.Windows.Forms.TextBox();
34 this.textBoxAddress = new System.Windows.Forms.TextBox();
35 this.textBoxAge = new System.Windows.Forms.TextBox();
36 this.textBoxOutput = new System.Windows.Forms.TextBox();
37 this.label4 = new System.Windows.Forms.Label();
38 this.label5 = new System.Windows.Forms.Label();
39 this.buttonOK = new System.Windows.Forms.Button();
40 this.buttonHelp = new System.Windows.Forms.Button();
41 this.checkBoxProgrammer = new System.Windows.Forms.CheckBox();
42 this.groupBoxSex = new System.Windows.Forms.GroupBox();
43 this.radioButtonMale = new System.Windows.Forms.RadioButton();
44 this.radioButtonFemale = new System.Windows.Forms.RadioButton();
45 this.groupBoxSex.SuspendLayout();
46 this.SuspendLayout();
47 //
48 // label1
49 //
50 this.label1.AutoSize = true;
51 this.label1.Location = new System.Drawing.Point(26, 27);
52 this.label1.Name = "label1";
53 this.label1.Size = new System.Drawing.Size(59, 12);
54 this.label1.TabIndex = 0;
55 this.label1.Text = "labelName";
56 //
57 // label2
58 //
59 this.label2.AutoSize = true;
60 this.label2.Location = new System.Drawing.Point(26, 53);
61 this.label2.Name = "label2";
62 this.label2.Size = new System.Drawing.Size(77, 12);
63 this.label2.TabIndex = 1;
64 this.label2.Text = "labelAddress";
65 //
66 // textBoxName
67 //
68 this.textBoxName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
69 | System.Windows.Forms.AnchorStyles.Right)));
70 this.textBoxName.Location = new System.Drawing.Point(127, 24);
71 this.textBoxName.Name = "textBoxName";
72 this.textBoxName.Size = new System.Drawing.Size(317, 21);
73 this.textBoxName.TabIndex = 2;
74 //
75 // textBoxAddress
76 //
77 this.textBoxAddress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
78 | System.Windows.Forms.AnchorStyles.Right)));
79 this.textBoxAddress.Location = new System.Drawing.Point(127, 50);
80 this.textBoxAddress.Multiline = true;
81 this.textBoxAddress.Name = "textBoxAddress";
82 this.textBoxAddress.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
83 this.textBoxAddress.Size = new System.Drawing.Size(317, 102);
84 this.textBoxAddress.TabIndex = 2;
85 //
86 // textBoxAge
87 //
88 this.textBoxAge.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
89 | System.Windows.Forms.AnchorStyles.Right)));
90 this.textBoxAge.Location = new System.Drawing.Point(127, 254);
91 this.textBoxAge.Name = "textBoxAge";

文章整理:西部数码--专业提供域名注册虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!