lstUser.Clear()
mySql = "select * from sqlusers"
rs = myRs(mySql, sqlIP, 1)
lstUser.View = View.Details
Dim i As Integer
If rs.Fields.Count > 0 Then
'添加列表框列標題項目
For i = 1 To rs.Fields.Count
lstUser.Columns.Add(rs.Fields.Item(i - 1).Name)
Next
'添加列表框數據內容
If rs.RecordCount > 0 Then
rs.MoveFirst()
For i = 1 To rs.RecordCount
lstUser.Items.Add(rs("用戶名").Value)
lstUser.Items.Item(i - 1).SubItems.Add(rs("密碼").Value)
lstUser.Items.Item(i - 1).SubItems.Add(rs("用戶類型").Value)
rs.MoveNext()
Next
End If
End Function