[RESOLVED] Object Location
If i wanted to use cursor coordinates to set the location for an object lets say a picturebox, so that wherever the cursor went, the object went, how would i go about doing that, since location (x,y) is a value and therefore cannot be the target of an assignment.
I know how to do cursor coordinates already.
Re: [RESOLVED] Object Location
Oops, VB6 leaking through, I guess Top and Left have been replaced by Location.
Re: [RESOLVED] Object Location
nope its still there they just dont show it
Re: [RESOLVED] Object Location
If you want to get or set just the Top or Left property then you use the Top or Left property because the X and Y properties of the Location cannot be set through the Location property. If you want to set both the Top and Left properties then you create a Point object and set the Location property as this forces it to happen in one operation rather than two, which can be visible to the user.
If you want to know what that message about not being the target of an assignment means then just ask.