Form1.cs
资源名称:VC#.NET范例.rar [点击查看]
上传用户:chinafred
上传日期:2007-08-14
资源大小:10127k
文件大小:5k
源码类别:
数据库编程
开发平台:
C#
- using System;
- using System.Drawing;
- using System.Collections;
- using System.ComponentModel;
- using System.Windows.Forms;
- using System.Data;
- namespace ch1_15
- {
- /// <summary>
- /// Form1 的摘要说明。
- /// </summary>
- public class Form1 : System.Windows.Forms.Form
- {
- private System.Windows.Forms.PictureBox pictureBox1;
- private System.Windows.Forms.Splitter splitter1;
- private System.Windows.Forms.RichTextBox richTextBox1;
- private System.Windows.Forms.Splitter splitter2;
- private System.Windows.Forms.ListView listView1;
- private System.Windows.Forms.ColumnHeader columnHeader1;
- private System.Windows.Forms.ColumnHeader columnHeader2;
- private System.Windows.Forms.ColumnHeader columnHeader3;
- /// <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 Form Designer generated code
- /// <summary>
- /// 设计器支持所需的方法 - 不要使用代码编辑器修改
- /// 此方法的内容。
- /// </summary>
- private void InitializeComponent()
- {
- System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
- System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem(new string[] {
- "皮耶罗",
- "意大利",
- "尤文图斯"}, -1, System.Drawing.SystemColors.WindowText, System.Drawing.SystemColors.Window, new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134))));
- this.pictureBox1 = new System.Windows.Forms.PictureBox();
- this.splitter1 = new System.Windows.Forms.Splitter();
- this.richTextBox1 = new System.Windows.Forms.RichTextBox();
- this.splitter2 = new System.Windows.Forms.Splitter();
- this.listView1 = new System.Windows.Forms.ListView();
- this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
- this.columnHeader2 = new System.Windows.Forms.ColumnHeader();
- this.columnHeader3 = new System.Windows.Forms.ColumnHeader();
- this.SuspendLayout();
- //
- // pictureBox1
- //
- this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Top;
- this.pictureBox1.Image = ((System.Drawing.Bitmap)(resources.GetObject("pictureBox1.Image")));
- this.pictureBox1.Name = "pictureBox1";
- this.pictureBox1.Size = new System.Drawing.Size(440, 160);
- this.pictureBox1.TabIndex = 0;
- this.pictureBox1.TabStop = false;
- //
- // splitter1
- //
- this.splitter1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.splitter1.Dock = System.Windows.Forms.DockStyle.Top;
- this.splitter1.Location = new System.Drawing.Point(0, 160);
- this.splitter1.MinExtra = 0;
- this.splitter1.Name = "splitter1";
- this.splitter1.Size = new System.Drawing.Size(440, 3);
- this.splitter1.TabIndex = 1;
- this.splitter1.TabStop = false;
- //
- // richTextBox1
- //
- this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Left;
- this.richTextBox1.Location = new System.Drawing.Point(0, 163);
- this.richTextBox1.Name = "richTextBox1";
- this.richTextBox1.Size = new System.Drawing.Size(100, 110);
- this.richTextBox1.TabIndex = 2;
- this.richTextBox1.Text = "Alex Del Piero";
- //
- // splitter2
- //
- this.splitter2.Location = new System.Drawing.Point(100, 163);
- this.splitter2.Name = "splitter2";
- this.splitter2.Size = new System.Drawing.Size(3, 110);
- this.splitter2.TabIndex = 3;
- this.splitter2.TabStop = false;
- //
- // listView1
- //
- this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
- this.columnHeader1,
- this.columnHeader2,
- this.columnHeader3});
- this.listView1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.listView1.Items.AddRange(new System.Windows.Forms.ListViewItem[] {
- listViewItem1});
- this.listView1.Location = new System.Drawing.Point(103, 163);
- this.listView1.Name = "listView1";
- this.listView1.Size = new System.Drawing.Size(337, 110);
- this.listView1.TabIndex = 4;
- this.listView1.View = System.Windows.Forms.View.Details;
- //
- // columnHeader1
- //
- this.columnHeader1.Text = "球员";
- //
- // columnHeader2
- //
- this.columnHeader2.Text = "国籍";
- //
- // columnHeader3
- //
- this.columnHeader3.Text = "效力俱乐部";
- this.columnHeader3.Width = 126;
- //
- // Form1
- //
- this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
- this.ClientSize = new System.Drawing.Size(440, 273);
- this.Controls.AddRange(new System.Windows.Forms.Control[] {
- this.listView1,
- this.splitter2,
- this.richTextBox1,
- this.splitter1,
- this.pictureBox1});
- this.Name = "Form1";
- this.Text = "分隔窗体";
- this.ResumeLayout(false);
- }
- #endregion
- /// <summary>
- /// 应用程序的主入口点。
- /// </summary>
- [STAThread]
- static void Main()
- {
- Application.Run(new Form1());
- }
- }
- }