zoukankan      html  css  js  c++  java
  • ProgressBar

    <1>基本信息设置

                progressBar1.Maximum = 1000;    //设置ProgressBar的最大值

                progressBar1.Value = 0;         //ProgressBar的初始值

                progressBar1.Step = 5;          //ProgressBar的增长度

                for (int i = 0; i < 10; i++)

                {

                    System.Threading.Thread.Sleep(1000);

                    progressBar1.Value += progressBar1.Step;

                }

    <2>C#中ProgressBar进度条从右向左显示:

      progressBar1.RightToLeft = System.Windows.Forms.RightToLeft.Yes;

          progressBar1.RightToLeftLayout = true;

    <3>C#中动态添加垂直显示的进度条

      首先声明代表进度条的全局对象: ProgressBar ProgressBar1 = new ProgressBar();  //进度条对象

      ProgressBar1 = AddNewProgressBar(182, 95,"RightProgressbar");   //(182,95)为Location

      private ProgressBar AddNewProgressBar(int x, int y,string name)     //动态添加垂直进度条方法

          {

              ProgressBar progressbar = new VerticlaProgressBar();

              progressbar.Location = new System.Drawing.Point(x, y);

              progressbar.Name = name;

              progressbar.Size = new System.Drawing.Size(23, 300);

              progressbar.Minimum = 0;

              progressbar.Maximum = 300;

              progressbar.TabIndex = 0;

              this.panel9.Controls.Add(progressbar);

              return progressbar;

         }

  • 相关阅读:
    html的入门——从标签开始(2)
    Idea快捷键
    Java_core复习
    gitblit重置管理员密码【gitblit】
    使用命令创建git仓库
    Windows平台下搭建自己的Git服务器【gitblit】
    python笔记
    代码整洁之道
    Vue学习02
    Vue学习01
  • 原文地址:https://www.cnblogs.com/zhanglei93/p/4762088.html
Copyright © 2011-2022 走看看