0
如何更改矩形的位置?如何更改矩形的位置?
private void Reset()
{
rndLocation();
face1.Height = 30.0F;
face1.Width = 25.0F;
lost = false;
//change rectangle location
}
如何更改矩形的位置?如何更改矩形的位置?
private void Reset()
{
rndLocation();
face1.Height = 30.0F;
face1.Width = 25.0F;
lost = false;
//change rectangle location
}
使用Rectangle.Location屬性,例如
face1.Location.X = new_X;
face1.Location.Y = new_Y;
完全忘了這個..謝謝!有沒有辦法同時更改X和Y值? – user3103552
face1.Location = new Point(x,y); – Shaharyar