public FormTest() { D2dFactory.EnableResourceSharing(this.Handle); m_canvas = new Canvas2d(); m_canvas.Dock = DockStyle.Fill; Controls.Add(m_canvas); this.ClientSize = new Size(1280, 900); }