C#窗体学习

 //进度条控件 

private void button1_Click(object sender, EventArgs e)
        {
            int i;
            progressBar1.Value = 0;
            for(i=0;i<=100;i++)
            {
                progressBar1.Value = i;
                label1.Text = i.ToString() + "/100";
            }
        }

 //跟踪条控件
        private void trackBar1_Scroll(object sender, EventArgs e)
        {
            progressBar1.Value = trackBar1.Value;
            label1.Text = progressBar1.Value.ToString() + "/100";
        }

posted @ 2014-03-21 13:49  zhangyongjian  阅读(264)  评论(0编辑  收藏  举报