private void Form2_Load(object sender, EventArgs e) { //水平进度 //最大 最小值 progressBarControl1.Properties.Maximum = 100; progressBarControl1.Properties.Minimum = 0; progressBarControl1.Position = 0;//当前值 progressBarControl1.Properties.ShowTitle = true;//是否显示进度数据 //是否显示百分比 progressBarControl1.Properties.PercentView = false; //垂直进度 //最大 最小值 progressBarControl2.Properties.Maximum = 100; progressBarControl2.Properties.Minimum = 0; progressBarControl2.Position = 0;//当前值 progressBarControl2.Properties.ShowTitle = true;//是否显示数据 progressBarControl1.Properties.PercentView = true; progressBarControl2.Properties.ProgressKind = DevExpress.XtraEditors.Controls.ProgressKind.Vertical; //数据显示的位置 progressBarControl2.Properties.TextOrientation = DevExpress.Utils.Drawing.TextOrientation.Horizontal; marqueeProgressBarControl1.Properties.ShowTitle = true; marqueeProgressBarControl1.Text = "数据加载中...请稍后..."; marqueeProgressBarControl2.Properties.ShowTitle = true; marqueeProgressBarControl2.Text = "数据加载中...请稍后..."; marqueeProgressBarControl2.Properties.TextOrientation = DevExpress.Utils.Drawing.TextOrientation.VerticalDownwards; } private void timer1_Tick(object sender, EventArgs e) { if (progressBarControl1.Position <= 100) { progressBarControl1.Position += 1; progressBarControl2.Position += 1; } } 来自
.cnblogs
.com/xieyong_/p/
.html> private void simpleButton1_Click(object sender, EventArgs e) { progressBarControl1
.Properties
.Minimum =
0
; progressBarControl1
.Properties
.Maximum =
1000
; progressBarControl1
.Properties
.Step =
1
; progressBarControl1
.Properties
.ProgressViewStyle. = DevExpress
.XtraEditors
.Controls
.ProgressViewStyle
.Solid
; progressBarControl1
.Position =
0
; for (int i =
0
; i < progressBarControl1.Properties.Maximum ; i++) { Application
.DoEvents()
; //处理当前消息队列中的所有windows消息 System
.Threading
.Thread
.Sleep(
12)
; //当前线程挂起指定的时间,这个是为了演示 progressBarControl1
.PerformStep()
; //执行步长 } } 总结 progressBarControl使用很方便,只需要在使用时给它一个最小值,最大值,步长 执行progressBarControl1
.PerformStep()
; //处理当前消息队列中的所有windows消息 Application
.DoEvents()
; 这样就OK 了 来自
.cnblogs
.com/xiaofengfeng/archive/
2011/
11/
28/
.html>
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/207380.html原文链接:https://javaforall.net
