Share via

How do you set an object's Y axis in code?

Lucas Franklin 21 Reputation points
2021-03-10T00:25:59.04+00:00

picEnemy.Location.Y.Equals(enemyposition)

I tried this and it didn't work, any ideas?

Developer technologies | Windows Forms

Answer accepted by question author

Viorel 127K Reputation points
2021-03-10T09:25:33.463+00:00

Try another statement: picEnemy.Top = enemyposition.

Use picEnemy.Left to change the X.

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.