3
Answers

Moving an object in VB 2008

Ask a question
Emerogork

Emerogork

14y
4.4k
1
 Using a Button, one can program changes in size by using btnChange.width = 500. I would like to use a similar line to change the location of a button.  The location property has an X and Y value but I cannot seem to program it to change the button position. I tried something like btnChange.Location.Y = 200 but the system tells me that "the expression is a value and therefore cannot be the target of a assignment. Does it make sense that the size can be the target but location cannot?

I have used lines like:  btnMoveMe.Location = (200, 200) and  btnMoveMe.Location.Y = 200 but the system tells me that the expression is a value and cannot be the target of an expression.
 

Answers (3)
Next Recommended Forum