private void rectNogoButton_Click(object sender, EventArgs e)
        {
            ButtonRectangle btn = sender as ButtonRectangle;

            btn.BackColor = Color.YellowGreen;
            squareNogoButton.Update();
        }
        private void draw_squareNogoButton()
        {/*draw the red blue square Button*/
            if (this.InvokeRequired)
            {
                this.Invoke(new MethodInvoker(this.draw_squareNogoButton));
            }
            else
            {
                // Create a square button
                squareNogoButton = new ButtonRectangle();

                // radius of circle button
                int diameter = objdiameter;

                // Set Button properties
                squareNogoButton.Location = new Point(Width - diameter - rightgap, Height / 2 - diameter / 2);
                squareNogoButton.Height   = diameter;
                squareNogoButton.Width    = diameter;

                // Set background and foreground
                squareNogoButton.BackColor = Color.Red;
                squareNogoButton.Name      = "squareNogoButton";


                // Add a Button Click Event handler
                squareNogoButton.Click += new EventHandler(rectNogoButton_Click);


                // Add Button to the Form. Placement of the Button
                // will be based on the Location and Size of button
                this.Controls.Add(squareNogoButton);

                squareNogoButton.Update();
            }
        }
        private void interface_ready()
        {
            if (this.InvokeRequired)
            {
                this.Invoke(new MethodInvoker(this.interface_ready));
            }
            else
            {
                g.Clear(Color.Black);
                if (circleGoButton != null)
                {
                    Controls.Remove(circleGoButton);
                    circleGoButton.Dispose();
                    circleGoButton = null;
                }

                if (squareNogoButton != null)
                {
                    Controls.Remove(squareNogoButton);
                    squareNogoButton.Dispose();
                    squareNogoButton = null;
                }
            }
        }