Reputation: 1
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
}
Upvotes: 0
Views: 3736
Reputation: 21757
Use the Rectangle.Location property e.g.
face1.Location.X = new_X;
face1.Location.Y = new_Y;
Upvotes: 1