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