Dim t0 As Threading.Thread
t0=New Threading.Thread(Sub() Functions.AsyncExecute("测试"))
Dim btnAuto As WinForm.Button = e.Form.Controls("btnAuto")
Dim bt As WinForm.Button = e.Form.Controls("btnManualClear")
If bt.text = "手动清除" Then
btnAuto.Enabled=False
gbclear=True
bt.text = "停止"
t0.Start()
Else
gbclear=False
bt.text = "手动清除"
t0.Abort
End If
btnAuto.Enabled=True
Functions.AsyncExecute("测试") 部分代码
With CurrentTable
'Dim Positionrow As Integer = .Position
'Dim c As Col = .Cols(t.ColSel).name
'Dim Colname= c.Name
If .Position >49 Then
'If Positionrow > 49 Then
MessageBox.show("已到达最大行")
Else
'Dim t As Table = Tables("测试表") '用这个新增会导致主表定位到其他行
.Rows(.Position)(.Cols(.ColSel).name) = v3
.Position = .Position + 1
'向下移动一行
'End If
End If
End With