本文介绍了进度栏扭曲问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的问题有点扭曲...
如何 ?我的功能之一在执行复杂操作时将表单挂起
计算矩阵特征值和矩阵尺寸的计算方法不是恒定的,这妨碍了我预测进度条的最大值,虽然该函数进行计算,但也悬挂了表格,我想要的是,应该在显示进度条的同时函数终止时悬挂formvand,还必须设置进度条...
谢谢!
my problem is little bit twisted...
how ? one of my function hangs the form as it performs the complex
calculation of calculating eigen values of mattrix and dimension of mattrix is not constant which hinders me in predicting the maximum value for progress bar and while this function makes computation,it also hangs the form, what i want is that, progress bar should be displayed while hanging of formvand when function terminates ,progress bar must also be disposed...
Thank you!
推荐答案
private void ShowProgress(int percent)
{
if (InvokeRequired)
{
Invoke(new MethodInvoker(delegate { ShowProgress(percent); }));
}
else
{
myProgressBar.Value = percent;
}
}
这篇关于进度栏扭曲问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!