我有几个报告都合并到同一个数据表中。用户可以单击多个运行,然后单击“查找记录”按钮同时运行它们。由于它们每个都需要很长时间,我想在状态栏上更新用户,因为每个存储过程都被成功调用。但是,当我调用该过程时,我只会在最后列出所有内容的更新。
我想做什么:
'Initialize Progress Components
repCompleted = 0
ProgressBar1.Minimum = 0
ProgressBar1.Maximum = repSel
ProgressBar1.Value = repCompleted
TextBlock2.Text = repCompleted & " of " & repSel & " reports finished"
然后随着每个报告成功运行,更新repCompleted
值并刷新
repCompleted += 1
TextBlock2.Text = repCompleted & " of " & repSel & " reports finished"
ProgressBar1.Value = repCompleted
问题是这些刷新在我退出子程序之前不会发生。我希望它在每个完成时向前计数,即1 of 4 completed
,2 of 4 completed
等。
有任何想法吗?