⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 avcaptest.frm

📁 AVCapture是一个基于Microsoft的DirectShow技术开发的音视频讯号捕捉ActiveX 控件
💻 FRM
字号:
VERSION 5.00
Object = "{1A3862E1-45DE-4D73-A9C7-1C94C04A0999}#1.0#0"; "AVCAP.DLL"
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   6255
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   7215
   Icon            =   "AVCapTest.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   11115
   ScaleWidth      =   15240
   StartUpPosition =   3  'Windows Default
   Begin AVCAPLibCtl.AVCapture AVCapture1 
      Height          =   5055
      Left            =   0
      OleObjectBlob   =   "AVCapTest.frx":0442
      TabIndex        =   8
      Top             =   1200
      Width           =   7215
   End
   Begin VB.CommandButton SetupOther 
      Caption         =   "其他设置"
      Height          =   615
      Left            =   5400
      TabIndex        =   9
      Top             =   600
      Width           =   1815
   End
   Begin VB.CommandButton SetupAVI 
      Caption         =   "设置AVI捕捉特性"
      Height          =   615
      Left            =   5400
      TabIndex        =   7
      Top             =   0
      Width           =   1815
   End
   Begin VB.CommandButton SetText 
      Caption         =   "设置文本"
      Height          =   615
      Left            =   3600
      TabIndex        =   6
      Top             =   600
      Width           =   1815
   End
   Begin VB.TextBox Text1 
      Height          =   615
      Left            =   720
      TabIndex        =   4
      Text            =   "Text1"
      Top             =   600
      Width           =   2895
   End
   Begin VB.CommandButton Coarseness 
      Caption         =   "-"
      Height          =   615
      Left            =   360
      TabIndex        =   2
      Top             =   600
      Width           =   375
   End
   Begin VB.CommandButton Fine 
      Caption         =   "+"
      Height          =   615
      Left            =   0
      TabIndex        =   1
      Top             =   600
      Width           =   375
   End
   Begin VB.CommandButton SetupVCF 
      Caption         =   "设置视频捕捉格式"
      Height          =   615
      Left            =   3600
      TabIndex        =   5
      Top             =   0
      Width           =   1815
   End
   Begin VB.CommandButton SetupACD 
      Caption         =   "设置音频捕捉设备"
      Height          =   615
      Left            =   1800
      TabIndex        =   3
      Top             =   0
      Width           =   1815
   End
   Begin VB.CommandButton SetupVCD 
      Caption         =   "设置视频捕捉设备"
      Height          =   615
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   1815
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub AVCapture1_OnSelectedDeviceRemoved(ByVal strName As String, ByVal lIndex As Long, ByVal eType As AVCAPLibCtl.EDeviceType)
i = 0
End Sub


Private Sub AVCapture1_SelectedDeviceRemoved(ByVal strName As String, ByVal lIndex As Long, ByVal eType As AVCAPLibCtl.EDeviceType)

End Sub

Private Sub Coarseness_Click()
AVCapture1.Coarseness '降低视频采集分辨率
Dim strACDName, strVCDName, strWidth, strHeight As String
strHeight = Str(AVCapture1.VideoHeight)
strWidth = Str(AVCapture1.VideoWidth)
strACDName = AVCapture1.GetACDName(AVCapture1.CurACD)
strVCDName = AVCapture1.GetVCDName(AVCapture1.CurVCD)
Form1.Caption = "ACD:[" + strACDName + "] VCD:[" + strVCDName + "] " + strWidth + "x" + strHeight
End Sub


Private Sub Fine_Click()
AVCapture1.Fine '增高视频采集分辨率
Dim strACDName, strVCDName, strWidth, strHeight As String
strHeight = Str(AVCapture1.VideoHeight)
strWidth = Str(AVCapture1.VideoWidth)
strACDName = AVCapture1.GetACDName(AVCapture1.CurACD)
strVCDName = AVCapture1.GetVCDName(AVCapture1.CurVCD)
Form1.Caption = "ACD:[" + strACDName + "] VCD:[" + strVCDName + "] " + strWidth + "x" + strHeight
End Sub

Private Sub Form_Load()
Dim strACDName, strVCDName, strWidth, strHeight As String
strHeight = Str(AVCapture1.VideoHeight)
strWidth = Str(AVCapture1.VideoWidth)
strACDName = AVCapture1.GetACDName(AVCapture1.CurACD)
strVCDName = AVCapture1.GetVCDName(AVCapture1.CurVCD)
Form1.Caption = "ACD:[" + strACDName + "] VCD:[" + strVCDName + "] " + strWidth + "x" + strHeight
AVCapture1.TVFormat = NTSC_M
End Sub

Private Sub Form_Resize()
If Form1.ScaleHeight - SetupVCD.Height * 2 > 0 Then
    AVCapture1.Height = Form1.ScaleHeight - SetupVCD.Height * 2
End If
If Form1.ScaleWidth > 0 Then
    AVCapture1.Width = Form1.ScaleWidth
End If
Dim strACDName, strVCDName, strWidth, strHeight As String
strHeight = Str(AVCapture1.VideoHeight)
strWidth = Str(AVCapture1.VideoWidth)
strACDName = AVCapture1.GetACDName(AVCapture1.CurACD)
strVCDName = AVCapture1.GetVCDName(AVCapture1.CurVCD)
Form1.Caption = "ACD:[" + strACDName + "] VCD:[" + strVCDName + "] " + strWidth + "x" + strHeight
End Sub

Private Sub SetText_Click()
AVCapture1.TitleGenerator.Text = Text1.Text '设置字幕文本
AVCapture1.TitleGenerator.Font.Name = "Arial" '字体名称
AVCapture1.TitleGenerator.Font.Size = 48 '字体尺寸
AVCapture1.TitleGenerator.Font.Italic = True '倾斜
AVCapture1.TitleGenerator.Font.Underline = True '下划线
AVCapture1.VideoSampleMachining.Inversion = True '允许视频垂直翻转
AVCapture1.VideoSampleMachining.MirrorImage = True '允许视频水平镜像
End Sub

Private Sub SetupACD_Click()
AVCapture1.ShowConfigureDialog (AudioCaptureDeviceConfigure) '设置音频捕捉设备
End Sub

Private Sub SetupAVI_Click()
AVCapture1.ShowConfigureDialog (AVIMuxConfigure) '设置AVI混合器
End Sub

Private Sub SetupOther_Click()
AVCapture1.ShowConfigureDialog (OtherConfigure) '设置其他未知可设置项
End Sub

Private Sub SetupVCD_Click()
AVCapture1.ShowConfigureDialog (VideoCaptureDeviceConfigure) '设置视频捕捉设备
End Sub

Private Sub SetupVCF_Click()
AVCapture1.ShowConfigureDialog (VideoCaptureFormatConfigure) '设置视频捕捉格式
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -