简单的多线程示例

 Private Sub mnuSys_Menu_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mnuSys_Menu.Click
     
Dim td As New System.Threading.Thread(AddressOf Query)
      td.Start()
  
End Sub

  
Private Sub Query()
     
Dim Cmd As New System.Data.OracleClient.OracleCommand
     
Dim ds1 As DataSet = New DataSet
      Cmd.Connection
= con
      Cmd.CommandText
= sql
      adapter.Fill(ds1,
"stat")
      DataGridView1.DataSource
= ds1.Tables("stat"
  
End Sub

你可能感兴趣的:(简单的多线程示例)