-- 作者:nxqtxwz
-- 发布时间:2018/9/6 18:00:00
-- 请求帮助
总显示编译错误,未声明名称“_lVars”
Dim camList As WinForm.ComboBox = e.Form.Controls("CamList") \'设置控件大小 Functions.Execute("SetCamBoxSize",e.Form,True) \'设置移动条 e.Form.Controls("BarX").Value = e.Form.Controls("LineBox").Left - e.Form.Controls("CamViewBox").Left e.Form.Controls("BarY").Value = e.Form.Controls("CamViewBox").Height - (e.Form.Controls("LineBox").Top - e.Form.Controls("CamViewBox").Top) e.Form.Controls("BarW").Value = e.Form.Controls("LineBox").Width e.Form.Controls("BarH").Value = e.Form.Controls("CamViewBox").Height - e.Form.Controls("LineBox").Height \'显示拍照框尺寸 e.Form.Controls("BoxW").Value = e.Form.Controls("LineBox").Width e.Form.Controls("BoxH").Value = e.Form.Controls("LineBox").Height _lVars(0) = e.Form.Controls("AutoTake").Checked \'设置保存路径 If _sVars(0) <> "" e.Form.Controls("FileName").Value = _sVars(0) End If \'获取摄像头列表 Functions.Execute("GetCams") \'显示摄像头列表 Dim i As Integer camList.Items.Clear For i=0 To _CamList.Count - 1 camList.Items.Add(_CamList(i)) Next \'默认选中第一个摄像头 If _CamList.Count > 1 And _CamIndex < 1 _CamIndex = 1 End If camList.SelectedIndex = _CamIndex \'激活预览 If _CamList.Count > 0 Functions.Execute("SetCamView",_CamIndex,e.Form.Controls("CamView")) Else MessageBox.Show("未检测摄像头,请先连接摄像头!","警告") e.Form.Close() End If \'启动定时器 _iVars(0) = 0 e.Form.TimerEnabled = True
|
-- 作者:nxqtxwz
-- 发布时间:2018/9/6 21:36:00
--
老师您好,我在全局变量中设置:
\'临时共享变量 Public _sVars(100) As String Public _dVars(100) As Date Public _bVars(100) As Boolean Public _iVars(100) As Integer Public _lVars(100) As Long
\'摄像头 Public _Cap As DCap.Capture Public _Cams As DCap.Filters = New DCap.Filters() Public _Cam As DCap.Filter Public _CamList As New List(Of String) Public _CamIndex As Integer
总是出错:编译错误:未定义类型“DCap.Capture”
错误代码:pubic_Cap As DCap.Capture
红色的三行都会显示错误。
|