嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300
本次赞助数额为: 2 元微信扫码支付:2 元
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
横向文字流动跑马 开关灯按钮变化
	 //按钮开事件
        private void button1_Click(object sender, EventArgs e)
        {
            button1.BackColor = Color.Gray;
            button2.Enabled = true;
            button1.Enabled = false;
            button1.Text = "";
            button2.BackColor = Color.White;
            button2.Text = "关";
        }
        //按钮关事件
        private void button2_Click(object sender, EventArgs e)
        {
            button2.BackColor = Color.Gray;
            button2.Text = "";
            button1.Enabled = true;
            button2.Enabled = false;
            button1.BackColor = Color.White;
            button1.Text = "开";
        }
        //点击关闭窗口事件
                                                                private void Form3_FormClosing(object sender, FormClosingEventArgs e)
        {
            DialogResult result = MessageBox.Show("你确定要关闭吗!", "提示信息", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
            if (result == DialogResult.OK)
            {
                e.Cancel = false;  //点击OK
                Form1 f = new Form1();
                f.Show();
            }
            else
            {
                e.Cancel = true;
            }  
        }
            //欢迎来到跑马灯页面事件
            delegate void show();
            Thread t = null;
            public void ShowLbl()
            {
                while (true)
                {
                    if (panel1.InvokeRequired)
                    {
                        panel1.Invoke(new show(GetConfig));
                    }
                    Thread.Sleep(200);
                }
            }
            //欢迎来到跑马灯页面事件
            private void GetConfig()
            {
                try
                {
                    this.label3.Text = "欢迎来到跑马灯页面";
                    this.label4.Text = "欢迎来到跑马灯页面";
                    this.label3.Left = label3.Left - 10;
                    this.label4.Left = label3.Left   this.label3.Size.Width;
                    if (label3.Left   label3.Size.Width <= 0)
                    {
                        label3.Left = label4.Left;
                        label4.Left = label3.Left   this.label3.Size.Width;
                        for (int i = 0; i < 255; i  )
                            //label3.ForeColor = new Color(i, i, i);
                            label3.ForeColor = new SolidColorBrush(Color.FromArgb(i, i, i));
                        //new Color()= Color.FromArgb(i, i, i);
                        //label3.BackColor = Color.FromArgb(i, 0, 0, 0);
                        Application.DoEvents();
                        Thread.Sleep(100);
                    }
                }
                catch (Exception ex)
                {
                }
            }
            private void HorseLamp_Load(object sender, EventArgs e)
            {
                t = new Thread(new ThreadStart(ShowLbl));
                t.Start();
            }