全局代码Public _Cams As DCap.Filters = New DCap.Filters()改成Public _Cams As DCap.Filters
GetCams函数
'获得摄像头名称列表
'_Cams,_CamList在全局代码定义
Try
_Cams = New DCap.Filters()
Dim f As DCap.Filter
_Cams = New DCap.Filters()
_CamList.Clear()
_CamList.Add("无")
Dim c As Integer
For c=0 To _Cams.VideoInputDevices.Count - 1
f = _Cams.VideoInputDevices(c)
_CamList.Add(f.Name)
Next
Catch
MessageBox.Show("未找到摄像头","提示")
Return Nothing
End Try