Example #1
0
        public void RenderToControl(int x, int y)
        {
            IntPtr hdc = NativeUser32Api.ControlDC(Control);

            RenderTo(hdc, x, y);
            NativeUser32Api.ReleaseDC(Control.Handle, hdc);
        }
Example #2
0
        public GDISurface(int width, int height, Control compatibleControl, bool bindControl)
        {
            IntPtr hDCControk = NativeUser32Api.ControlDC(compatibleControl);

            Init(width, height, hDCControk);
            NativeUser32Api.ReleaseDC(compatibleControl.Handle, hDCControk);

            if (bindControl)
            {
                Control = compatibleControl;
            }
            else
            {
            }

            Create();
        }