我的需求是:
在删除行和增加行时,在窗口状态栏中显示进度条。
下面代码如何调整:
'''=======删除所有行=======
Dim tb1 As Table = Tables("标录分析_Table01")
'tb1.StopRedraw
For i As Integer = tb1.Rows.Count - 1 To 0 Step -1
tb1.Rows(i).Delete()
Next
''======加载球号=======
e.Form.TimerEnabled = False
StatusBar.Message1 = "正在添加"
StatusBar.ProgressBar.Visible = True
StatusBar.ProgressBar.Value = 0
StatusBar.ProgressBar.Maximum = tb1.Rows.Count
StatusBar.Refresh
For Each fdr As DataRow In DataTables("开标记录").Select("中标球号 > 0")
For i As Integer = 1 To tb1.Rows.Count
Dim ndr As DataRow = DataTables("标录数据").AddNew()
For Each dc As DataCol In DataTables("开标记录").DataCols
If DataTables("标录数据").DataCols.Contains(dc.Name) Then
ndr(dc.Name) = fdr(dc.Name)
End If
Next
StatusBar.ProgressBar.Value += 10
StatusBar.Refresh
Next
Next
Application.DoEvents()
StatusBar.Message1 = "完成"
tb1.Sort = "开标日期,开标时间"
'tb1.ResumeRedraw