ResizeWindowBasedOnFont Method
- Last UpdatedNov 06, 2025
- 1 minute read
The ResizeWindowBasedOnFont() method resizes the specified dialog based on the ratio of the size of the font originally used to the new font size.
'Declaration
Public Shared Sub ResizeWindowBasedOnFont( _
ByVal origWidth As Integer, _
ByVal origHeight As Integer, _
ByVal form As Form, _
ByVal origFontSize As Single, _
ByVal newFontSize As Single, _
ByVal isCentered As Boolean _
)
public static void ResizeWindowBasedOnFont(
int origWidth,
int origHeight,
Form form,
float origFontSize,
float newFontSize,
bool isCentered
)
Parameters
- origWidth
- Required. Holds the original (as designed) width of the dialog being resized.
- origHeight
- Required. Holds the original (as designed) height of the dialog being resized.
- form
- Required. Holds the dialog to be resized.
- origFontSize
- Required. Holds the original (as designed) font size of the dialog.
- newFontSize
- Required. Holds the new font size to use for the dialog.
- isCentered
- Required. Holds a flag that, if set to true, indicates that the dialog should be centered.