public frmRaycaster() { InitializeComponent(); System.Drawing.Bitmap canvas = new System.Drawing.Bitmap(pictureBox1.Width, pictureBox1.Height); m_rayCaster = new CRayCaster(canvas, this.BackColor); m_rayCaster.init(); updatePicture(m_rayCaster.getImg()); }