/// <summary> /// 抓图到文件 /// </summary> /// <param name="path"></param> public void GrabImage(string path) { IntPtr hBmp = Marshal.StringToHGlobalAnsi(path); AviCapture.SendMessage(lwndC, AviCapture.WM_CAP_SAVEDIB, 0, hBmp.ToInt32()); }
/// <summary> /// 抓图到剪切板 /// </summary> /// <returns></returns> public bool GrabImageToClipBoard() { return(AviCapture.SendMessage(lwndC, AviCapture.WM_CAP_EDIT_COPY, 0, 0)); }
private bool capSetVideoFormat(IntPtr hCapWnd, ref AviCapture.BITMAPINFO BmpFormat, int CapFormatSize) { return(AviCapture.SendMessage(hCapWnd, AviCapture.WM_CAP_SET_VIDEOFORMAT, CapFormatSize, ref BmpFormat)); }
private bool capOverlay(IntPtr lwnd, bool f) { return(AviCapture.SendMessage(lwnd, AviCapture.WM_CAP_SET_OVERLAY, f, 0)); }
private bool capPreviewRate(IntPtr lwnd, short wMS) { return(AviCapture.SendMessage(lwnd, AviCapture.WM_CAP_SET_PREVIEWRATE, wMS, 0)); }
private bool capSetCallbackOnFrame(IntPtr lwnd, AviCapture.FrameEventHandler lpProc) { return(AviCapture.SendMessage(lwnd, AviCapture.WM_CAP_SET_CALLBACK_FRAME, 0, lpProc)); }
private bool capPreview(IntPtr lwnd, bool f) { return(AviCapture.SendMessage(lwnd, AviCapture.WM_CAP_SET_PREVIEW, f, 0)); }
private bool capDriverDisconnect(IntPtr lwnd) { return(AviCapture.SendMessage(lwnd, AviCapture.WM_CAP_DRIVER_DISCONNECT, 0, 0)); }
private bool capDriverConnect(IntPtr lwnd, short i) { return(AviCapture.SendMessage(lwnd, AviCapture.WM_CAP_DRIVER_CONNECT, i, 0)); }
private bool capSetVideoFormat(IntPtr hCapWnd, ref AviCapture.BITMAPINFO BmpFormat, int CapFormatSize) { return AviCapture.SendMessage(hCapWnd, AviCapture.WM_CAP_SET_VIDEOFORMAT, CapFormatSize, ref BmpFormat); }
private bool capSetCallbackOnFrame(IntPtr lwnd, AviCapture.FrameEventHandler lpProc) { return AviCapture.SendMessage(lwnd, AviCapture.WM_CAP_SET_CALLBACK_FRAME, 0, lpProc); }