For Each _row As DataGridViewRow In datagridview.Rows
'searchRecords_refreshRow(_row)
' 上面以前,直接运行函数,太慢
' 下面现在,运行线程,快多了
Dim t As Threading.Thread = New Threading.Thread(AddressOf searchRecords_refreshRow)
t.SetApartmentState(Threading.ApartmentState.STA)
t.IsBackground = True' 在后台运行(随宿主关闭而关闭)
t.Start(_row)
Next