Page Units

In Chapter 22, “Forms,” and earlier in this chapter, we mentioned units when referring to positioning of elements on a form. Up until now, these units have been in terms of pixels on the screen. This is the default setting, however, and you can change this based on your needs.

The setting that specifies the unit of measurement is the PageUnit property on the Graphics object. The PageUnit property is a System.Drawing.GraphicsUnit enumeration. Table 26.2 shows the GraphicsUnit enumeration.

Table 26.2. GraphicsUnit Enumeration Values
Name Description
Display 1/75 of an inch
Document 1/300 of an inch
Inch Inch
Millimeter Millimeter
Pixel ...

Get Visual Basic® .NET by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.