日期:2009-10-25  浏览次数:20674 次

环境:win2000 server 、DOTNET beta2

本程序旨在练习,请朋友们多指教


using System;

using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;

namespace SohoContral
{
    /// <summary>
    /// 定义平面格式的按扭
    /// </summary>
    public class FlatButton : System.Windows.Forms.UserControl
    {
        private string _text="";                //定义按纽文字

        public string Text{
            set{_text=value;}
            get{return _text;}
        }

        
        private System.Windows.Forms.Button button1;
        private System.Windows.Forms.Label label1;
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.Container components = null;

        public FlatButton()
        {
            InitializeComponent();
        }

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        protected override void Dispose( bool disposing )
        {
            if( disposing )
            {
                if( components != null )
                    components.Dispose();
            }
            base.Dispose( disposing );
        }

        #region Component Designer generated code
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.label1 = new System.Windows.Forms.Label();
            this.button1 = n