Exemple #1
0
        /// <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());
        }
Exemple #2
0
 /// <summary>
 /// 抓图到剪切板
 /// </summary>
 /// <returns></returns>
 public bool GrabImageToClipBoard()
 {
     return(AviCapture.SendMessage(lwndC, AviCapture.WM_CAP_EDIT_COPY, 0, 0));
 }
Exemple #3
0
 private bool capSetVideoFormat(IntPtr hCapWnd, ref AviCapture.BITMAPINFO BmpFormat, int CapFormatSize)
 {
     return(AviCapture.SendMessage(hCapWnd, AviCapture.WM_CAP_SET_VIDEOFORMAT, CapFormatSize, ref BmpFormat));
 }
Exemple #4
0
 private bool capOverlay(IntPtr lwnd, bool f)
 {
     return(AviCapture.SendMessage(lwnd, AviCapture.WM_CAP_SET_OVERLAY, f, 0));
 }
Exemple #5
0
 private bool capPreviewRate(IntPtr lwnd, short wMS)
 {
     return(AviCapture.SendMessage(lwnd, AviCapture.WM_CAP_SET_PREVIEWRATE, wMS, 0));
 }
Exemple #6
0
 private bool capSetCallbackOnFrame(IntPtr lwnd, AviCapture.FrameEventHandler lpProc)
 {
     return(AviCapture.SendMessage(lwnd, AviCapture.WM_CAP_SET_CALLBACK_FRAME, 0, lpProc));
 }
Exemple #7
0
 private bool capPreview(IntPtr lwnd, bool f)
 {
     return(AviCapture.SendMessage(lwnd, AviCapture.WM_CAP_SET_PREVIEW, f, 0));
 }
Exemple #8
0
 private bool capDriverDisconnect(IntPtr lwnd)
 {
     return(AviCapture.SendMessage(lwnd, AviCapture.WM_CAP_DRIVER_DISCONNECT, 0, 0));
 }
Exemple #9
0
 private bool capDriverConnect(IntPtr lwnd, short i)
 {
     return(AviCapture.SendMessage(lwnd, AviCapture.WM_CAP_DRIVER_CONNECT, i, 0));
 }
Exemple #10
0
 private bool capSetVideoFormat(IntPtr hCapWnd, ref AviCapture.BITMAPINFO BmpFormat, int CapFormatSize)
 {
     return AviCapture.SendMessage(hCapWnd, AviCapture.WM_CAP_SET_VIDEOFORMAT, CapFormatSize, ref BmpFormat);
 }
Exemple #11
0
 private bool capSetCallbackOnFrame(IntPtr lwnd, AviCapture.FrameEventHandler lpProc)
 {
     return AviCapture.SendMessage(lwnd, AviCapture.WM_CAP_SET_CALLBACK_FRAME, 0, lpProc);
 }