private void Program_Load(object sender, EventArgs e) { this.g2d = null; this.wld = CreateWorld (); this.count = 0; g2d = Graphics2D.GetInstance (); g2d.CreateWindow (panel1.Handle); }