进度条问题 [英] Progress bar problem

查看:74
本文介绍了进度条问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用ProgressBar控件和一个Label来显示进程的

状态。它们都被放置在面板中。

对象。

当进程完成一项任务并在启动之前

其他任务时,它将更新ProgressBar中的值和

标签中的文字。

问题是ProgressBar更新并正确显示

(条形图是更改)但标签不是'' T。它的位置似乎缺少了

。它有什么问题?

I use ProgressBar control and one Label to display the
status of the process. Both of them are placed in panel
object.
When the process finish doing one task and before start
the other task, it will update value in ProgressBar and
text in label.
The problem is ProgressBar is update and correctly display
(bar is change) but the label doesn''t. It seems missing
from its position. What wrong with it?

推荐答案

嗨先生克里奇,


你必须告诉我们更多和/或向我们展示一些代码。


问候,

Fergus
Hi Mr Krich,

You''ll have to tell us more and/or show us some code.

Regards,
Fergus


你确定吗?你在面板上添加了标签?如果不是这个标签可能会被放置在面板下面而且看不见(你可以试着把这个标签带到前面

,我也建议你试试这个事件做某事

否则你发送给标签的文字就像把它全部放在一个字符串中

并显示字符串几次,以确保你发送真实的

发给标签的文字。


希望它有所帮助


eric

" ; MrKrich"< an ******* @ discuss.microsoft.com>在留言中写道

news:08 **************** ************ @ phx.gbl ...
are you sure you added the label on the panel? if not the label could be
placed under the pannel and be invisible (you could try bring to front on
the label, I would also suggest that you try having the event do somthing
else w the text you are sending to the label like placing it all in a string
and displaying the string a few times yust to make sure you are sending real
text to the label.

hope it helps

eric
"MrKrich" <an*******@discussions.microsoft.com> wrote in message
news:08****************************@phx.gbl...
我使用ProgressBar控件和一个Label来显示进程的状态。两者都是放置在面板中
对象。
当进程完成一项任务并在启动另一项任务之前,它将更新ProgressBar中的值和
文本中的值。
问题是ProgressBar是更新并正确显示
(条形图是更改)但标签不是。它的位置似乎缺失了。它有什么问题?
I use ProgressBar control and one Label to display the
status of the process. Both of them are placed in panel
object.
When the process finish doing one task and before start
the other task, it will update value in ProgressBar and
text in label.
The problem is ProgressBar is update and correctly display
(bar is change) but the label doesn''t. It seems missing
from its position. What wrong with it?



当我更新进度条和

标签时,这是我的代码的一部分。我使用进度条和标签来显示进度

的备份功能。当它完成任务并开始下一个任务时它会更新两个控件。

ProgressBar = pgbBackupProgress

Label = lblBackupProgressDescription


''进度条的默认值

pgbBackupProgress.Value = 0

lblBackupProgressDescription.Text ="备份默认数据>

''开始将数据库中的默认数据存储到数据集

dsBackup = backupData.BackupDefaultDataSet(cnn,

dsBackup)


pgbBackupProgress.Value = 20

lblBackupProgressDescription.Text ="备份

配置数据"

''开始将配置从数据库存储到数据集

dsBackup = backupData.BackupConfigurationSet(cnn,

dsBackup)

pgbBackupProgress.Value = 50

lblBackupProgressDescription。 Text =" Backup Document

Data"


此后仍有3-4个备份任务但是e代码

类似于上面的代码。问题是当

进度条更新时(我可以看到它发生变化),标签

并没有改变。在此备份

功能完成之前,我看不到标签。
This is part of my code when I update a progressbar and a
label. I use progressbar and label to display the progress
of backup function. It will update both control when it
finish the task and start the next task.
ProgressBar = pgbBackupProgress
Label = lblBackupProgressDescription

''Default value for progressbar
pgbBackupProgress.Value = 0
lblBackupProgressDescription.Text = "Backup Default Data"
''Start to store Default data from database to dataset
dsBackup = backupData.BackupDefaultDataSet(cnn,
dsBackup)

pgbBackupProgress.Value = 20
lblBackupProgressDescription.Text = "Backup
Configuration Data"
''Start to store Configuration from database to dataset
dsBackup = backupData.BackupConfigurationSet(cnn,
dsBackup)
pgbBackupProgress.Value = 50
lblBackupProgressDescription.Text = "Backup Document
Data"

There is still 3-4 backup task after this but the code
is similar to the code above. The problem is while the
progressbar is update (I can see it change), the label
doesn''t change. I can not see the label until this backup
function finishes.


这篇关于进度条问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆