Because a control’s location can be identified with two values, it can also be illustrated as a geometric point on the coordinate system of the screen. A point is a pixel on the monitor screen, on a form, or on any object of your application. A point is represented by its coordinates with regard to the object that "owns" the point:
To identify the concept of a point, the System.Drawing namespace provides the
Point structure. One of the properties of the Point structure is X,
which represents the horizontal distance of the point from the top-left corner of the object that owns the point.
Another property, Y, represents the vertical measurement of the point with regards to the top-left corner of the object that owns the point.
The properties of a .NET Framework's Size structure are defined as natural
numbers. In some cases, you may need to use the values of these properties as
decimal numbers. To support this, you can use the PointF structure. Its
behavior is the same as the Point structure except that its properties
are declared as float values.
|