vb.net 如何实现视频捕捉

nkcrg 2005-03-17 03:38:52
能用DirectShow吗
如何用
...全文
232 9 打赏 收藏 举报
写回复
9 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
eggs112 2005-03-27
我也想研究一下,希望高手帮忙。
  • 打赏
  • 举报
回复
jdsbjcailei 2005-03-22
同样需求,希望高手讲解一二,最好能提供一些资料!
  • 打赏
  • 举报
回复
APP开发王 2005-03-21
http://blog.csdn.net/wgsnet/archive/2005/03/18/322936.aspx
  • 打赏
  • 举报
回复
haoco 2005-03-21
up
  • 打赏
  • 举报
回复
nkcrg 2005-03-19
能实现吗
  • 打赏
  • 举报
回复
nkcrg 2005-03-18
对不起
我讲错了,是视频采集
  • 打赏
  • 举报
回复
landlordh 2005-03-17

Inherits System.Windows.Forms.Form

Private Declare Function CreateDC Lib "gdi32" Alias "CreateDCA" (ByVal lpDriverName As String, ByVal lpDeviceName As String, ByVal lpOutput As String, ByVal lpInitData As String) As Integer

Private Declare Function CreateCompatibleDC Lib "GDI32" (ByVal hDC As Integer) As Integer

Private Declare Function CreateCompatibleBitmap Lib "GDI32" (ByVal hDC As Integer, ByVal nWidth As Integer, ByVal nHeight As Integer) As Integer

Private Declare Function GetDeviceCaps Lib "gdi32" Alias "GetDeviceCaps" (ByVal hdc As Integer, ByVal nIndex As Integer) As Integer

Private Declare Function SelectObject Lib "GDI32" (ByVal hDC As Integer, ByVal hObject As Integer) As Integer

Private Declare Function BitBlt Lib "GDI32" (ByVal srchDC As Integer, ByVal srcX As Integer, ByVal srcY As Integer, ByVal srcW As Integer, ByVal srcH As Integer, ByVal desthDC As Integer, ByVal destX As Integer, ByVal destY As Integer, ByVal op As Integer) As Integer

Private Declare Function DeleteDC Lib "GDI32" (ByVal hDC As Integer) As Integer

Private Declare Function DeleteObject Lib "GDI32" (ByVal hObj As Integer) As Integer

Const SRCCOPY As Integer = &HCC0020

Private oBackground As Bitmap
Private FW, FH As Integer

Protected Sub CaptureScreen()
Dim hSDC, hMDC As Integer
Dim hBMP, hBMPOld As Integer
Dim r As Integer

hSDC = CreateDC("DISPLAY", "", "", "")
hMDC = CreateCompatibleDC(hSDC)

FW = GetDeviceCaps(hSDC, 8)
FH = GetDeviceCaps(hSDC, 10)
hBMP = CreateCompatibleBitmap(hSDC, FW, FH)

hBMPOld = SelectObject(hMDC, hBMP)
r = BitBlt(hMDC, 0, 0, FW, FH, hSDC, 0, 0, 13369376)
hBMP = SelectObject(hMDC, hBMPOld)

r = DeleteDC(hSDC)
r = DeleteDC(hMDC)

oBackground = Image.FromHbitmap(New IntPtr(hBMP))
DeleteObject(hBMP)
End Sub

'使用:
'CaptureScreen()
'PictureBox1.Image = oBackground
  • 打赏
  • 举报
回复
hamadou 2005-03-17
不会,帮顶!
  • 打赏
  • 举报
回复
feels30000 2005-03-17
也在研究中,顶一下
  • 打赏
  • 举报
回复
发帖
VB

1.6w+

社区成员

VB技术相关讨论,主要为经典vb,即VB6.0
社区管理员
  • VB.NET
  • 水哥阿乐
  • 无·法
加入社区
帖子事件
创建了帖子
2005-03-17 03:38
社区公告
暂无公告