vb.net录屏 vba录制( 二 )


Private Declare Function capCreateCaptureWindowA Lib "avicap32.dll" ( _
ByVal lpszWindowName As String, _
ByVal dwStyle As Long, _
ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Integer, _
ByVal hWndParent As Long, ByVal nID As Long) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Integer, ByVal lParam As Long) As Long
Private Sub Form_Load()
'建立采集窗口(不显示窗口,处理后显示到PIC控件)
uwndc = capCreateCaptureWindowA("", WS_VISIBLE Or WS_CHILD, 0, 0, 320, 240, Me.hWnd, 0)
'连接
SendMessage uwndc, WM_CAP_DRIVER_CONNECT, 0, 0
'Scale开
SendMessage uwndc, WM_CAP_SET_SCALE, True, 0
'显示刷新MS
SendMessage uwndc, WM_CAP_SET_PREVIEWRATE, 40, 0
'用予览方式显示(特殊需要,不显示予缆)
SendMessage uwndc, WM_CAP_SET_PREVIEW, True, 0
End Sub
上述代码就可以实现 但是要注意相应的控件是否存在 不存在的 你自己画出来
VB.NET怎样播放视频首先要确定播放的视频格式是什么格式vb.net录屏,如果是windows media player支持的格式vb.net录屏,直接使用该控件就行vb.net录屏了vb.net录屏,如果是单个视频的话,比如命名为myPlayer,则vb.net录屏:
myPlayer.url="视频文件完整路径"
关于vb.net录屏和vba录制的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站 。

推荐阅读