Question getting the coordinates of a object

herms14

New member
Joined
Nov 8, 2009
Messages
4
Programming Experience
Beginner
guys I'm just new with visual basic. I would like to ask a question regarding coordinates.. Suppose I have object lets say a button how do i get the coordinates of the button in the form? also I want to button to move given a particular path, example if i draw a vertical line, the button will follow the line and move vertically. how do i get the coordinates of starting and endpoints of the line? thanks...hope to hear from you soon
 
The Location property of a control contains a Point that defines the location of its upper left corner with respect to its immediate parent. The Top and Left properties contain the X and Y components of that location individually. You can get or set any of those properties at any time.

You wouldn't "get" the start and end points of a line you drew because you'd have to know those points in the first place in order to draw the line.
 
Back
Top