You can provide support for the 120 dpi scale mode in Spread with the SpreadScaleMode property. Spread supports resizing rows, columns, cells, and data based on the dpi.
The automatic scaling only occurs when the form is loaded. The scaling can change at run time if there are changes to the control size and location and the container layout is suspended.
For the best results, set the AutoScaleMode property of the container to Dpi when using the ZoomDpiSupport option of the SpreadScaleMode property.
Using Code
- Suspend the layout.
- Set the location and size for the control.
- Set the SpreadScaleMode property to ZoomDpiSupport.
- Use the ResumeLayout method to see the changes.
Example
This example sets the SpreadScaleMode property to ZoomDpiSupport and suspends and resumes the layout.
C# | Copy Code |
---|---|
SuspendLayout(); AutoScaleDimensions = new System.Drawing.SizeF(96.0F, 96.0F); |
VB | Copy Code |
---|---|
SuspendLayout() AutoScaleDimensions = New System.Drawing.SizeF(96.0F, 96.0F) |