有高手帮助一下吧...
代码如下:
private void OpenCapture()
        {            int intWidth = this.pictureBox1.Width;
            int intHeight = this.pictureBox1.Height;
            int intDevice = 0;
            string refDevice = intDevice.ToString();
            hHwnd = xuyuan.capCreateCaptureWindowA(ref   refDevice, 1342177280, -1, 0, 120, 40, this.pictureBox1.Handle.ToInt32(), -30);
            if (xuyuan.SendMessage(hHwnd, 0x40a, intDevice, 0) > 0)
            {
                xuyuan.SendMessage(this.hHwnd, 0x435, -1, 0);
                xuyuan.SendMessage(this.hHwnd, 0x434, 0x42, 0);
                xuyuan.SendMessage(this.hHwnd, 0x432, -1, 0);
                xuyuan.SetWindowPos(this.hHwnd, 1, 0, 0, intWidth, intHeight, 10);

            }
            else
            {
                xuyuan.DestroyWindow(this.hHwnd);
            }
        }
        public Image CatchVideo()
        {
            SendMessage(this.hHwnd, 0x41e, 0, 0);
            IDataObject obj1 = Clipboard.GetDataObject();
            Image getIma = null;
            if (obj1.GetDataPresent(typeof(Bitmap)))
            {
                Image image1 = (Image)obj1.GetData(typeof(Bitmap));
                getIma = image1;
            }
            return getIma;
        }
拍照的相片偏移了,怎么让它居中了