Domanda

How do I change the location of where a rectangle is?

    private void Reset()
    {
        rndLocation();
        face1.Height = 30.0F;
        face1.Width = 25.0F;           
        lost = false;
        //change rectangle location
    }
È stato utile?

Soluzione

Use the Rectangle.Location property e.g.

face1.Location.X = new_X;
face1.Location.Y = new_Y;
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top