To change measurements, you need to call measurement conversion at run-time, for example, the CmToInch method or InchToCm method at run-time. For example, you can use the following code when you are working in centimeters and need to convert a Label's position measurements from centimeters to inches at run-time.
Visual Basic.NET code. Paste inside the Format event. |
Copy Code
|
---|---|
Me.Label1.Left = SectionReport1.CmToInch(2) Me.Label1.Top = SectionReport1.CmToInch(2) |
C# code. Paste inside the Format event. |
Copy Code
|
---|---|
this.label1.Left = SectionReport1.CmToInch(2); this.label1.Top = SectionReport1.CmToInch(2); |