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

问题描述


我遇到了一些问题,写了一些代码,似乎没有遵循应该的顺序。

代码(几乎是这样的):



progressbar1.Show();

progressBar1.Value = 5;

method();

progressBar1.value = 15;

method1();



进度条在两个方法运行之前都不会显示,我不明白为什么。

如果有人可以请一些建议吗?

谢谢。

HiI've got some problem, wrote some code, which doesn't seem to follow the sequence it should.
Code is (almost like this):

progressbar1.Show();
progressBar1.Value=5;
method();
progressBar1.value=15;
method1();

progressbar doesn't show up till the both the methods are run, i don't understand why.
if anyone could please suggest something?
Thank you.

推荐答案

progressbar1.Show();
progressBar1.Value=5;
method();
Update();
Refresh();
progressBar1.value=15;
method1();
Update();
Refresh();


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

09-18 02:28