回复 2楼 风吹过b
版主,你好,谢谢你的建议。
你的方法在之前我也试过了,还是不能实现的
我把部分代码贴上,你帮忙看下
form1部分代码:
'暂停播放/继续播放
Private Sub Command2_Click()
If Command2.Caption = "继续播放" Then
Command2.Caption = "暂停播放"
Else
Command2.Caption = "继续播放"
End If
ThplateDsp_WinTone1.PauseVideoCatch '暂停视频播放
End Sub
'手动抓图
Private Sub Command3_Click()
'ThplateDsp_WinTone1.SetBitmapSave (True) 是否保存抓图图片 想通过FORM2参数进行设置
'ThplateDsp_WinTone1.SetFileDiskPath ("E:\lvming\picture\\") 设置保存图片路径
ThplateDsp_WinTone1.HandCatch
Dim str As String
str = ThplateDsp_WinTone1.GetLicense + "
" + ThplateDsp_WinTone1.GetColor + "
" + ThplateDsp_WinTone1.GetType + "
" + CStr(ThplateDsp_WinTone1.GetCredibility) + "
" + CStr(ThplateDsp_WinTone1.GetRecognise)
List1.AddItem (str)
End Sub
'停止播放
Private Sub Command4_Click()
ThplateDsp_WinTone1.StopVideoCatch
End Sub
'打开文件
Public Sub Command5_Click()
Dim fstr As String
ThplateDsp_WinTone1.StopVideoCatch
CommonDialog1.Filter = "(*.mpg)|*.mpg|视频文件(*.avi)|*.avi|所有文件(*.*)|*.*|"
CommonDialog1.ShowOpen
fstr = CommonDialog1.FileName
If fstr <> "" Then
ThplateDsp_WinTone1.SetPlayFileName (fstr)
’ThplateDsp_WinTone1.SetBitmapSave (True) 我就是想把这的保存图片,及路径放在下面form2的参数设置里
’ThplateDsp_WinTone1.SetFileDiskPath ("E:\lvming\picture\\") 我就是想把这的保存图片,及路径放在下面form2的参数设置里
ThplateDsp_WinTone1.StartFromFile
End If
End Sub
'单帧播放
Private Sub Command6_Click()
ThplateDsp_WinTone1.SingleFramePlay
End Sub
'快进
Public Sub Command7_Click()
ThplateDsp_WinTone1.SetTimeIntervalValue (1)
ThplateDsp_WinTone1.SetTimeType (True)
ThplateDsp_WinTone1.ForwardPlay
End Sub
'快退
Public Sub Command8_Click()
ThplateDsp_WinTone1.SetTimeIntervalValue (1)
ThplateDsp_WinTone1.SetTimeType (True)
ThplateDsp_WinTone1.BackwardPlay
End Sub
...
...
form2 部分代码
Private Sub Command1_Click()’选择保存文件路径按钮
CommonDialog1.Filter = "抓图图片(*.bmp)|*.bmp|文本文件(*.jpg)|*.jpg|ALL File(*.*)|*.*"
CommonDialog1.FileName = "抓图图片" + Format(Now, "yyyyMMdd") + ".bmp" ' 默认一个文件名
CommonDialog1.ShowSave
Text1.Text = CommonDialog1.FileName
End Sub
' 参数设定完确定
Private Sub Command2_Click()
Dim dt As Date
Dim sql As String
Dim rs As New ADODB.Recordset
Dim cnn As New ADODB.Connection
cnn.Open "provider=sqloledb.1;persist security info = false;data source=test;initial catalog=v_catch;user id=sa;password=159753"
sql = "select * from 视频捕捉"
rs.CursorLocation = adUseClient
rs.Open sql, cnn, 1, 3
If Check1.Value = 1 Then
Call Form1.ThplateDsp_WinTone1.SetBitmapSave(True) 就是按你说的那个方法,但是还是无法事项
Call Form1.ThplateDsp_WinTone1.SetFileDiskPath("Text1.Text") '设置保存图片路径
Else
Call Form1.ThplateDsp_WinTone1.SetBitmapSave(False)
End If
If Check2.Value = 1 Then
Call SetAutoRun(True)
'设为开机自动运行
ElseIf Check2.Value = 0 Then
Call SetAutoRun(False)
'取消开机自动运行
End If
.....
.......