Form.
You can use the InsideHeight and InsideWidth properties to determine the height and width (in twips) of the window containing a form.
The InsideHeight and InsideWidth properties are available only in Visual Basic and can be set at any time.
If you want to determine the interior dimensions of the form itself, use the Height and Width properties. The interior of a form is the region inside the form, excluding the scroll bars and the record selectors.
You can also use the WindowHeight and WindowWidth properties to determine the height and width of the window containing a form.
Height, Width Properties; WindowHeight, WindowWidth Properties.
The following example shows how to use the InsideHeight and InsideWidth properties to compare the inside height and width of a form with the height and width of the form’s window. If the window’s dimensions do not equal the size of the form, then the window is resized to match the form’s height and width.
Sub ResetWindowSize(frm As Form) Dim intWindowHeight As Integer Dim intWindowWidth As Integer Dim intTotalFormHeight As Integer Dim intTotalFormWidth As Integer Dim intHeightHeader As Integer Dim intHeightDetail As Integer Dim intHeightFooter As Integer ' Determine form's height. intHeightHeader = frm.Section(1).Height intHeightDetail = frm.Section(0).Height intHeightFooter = frm.Section(2).Height intTotalFormHeight = intHeightHeader _ + intHeightDetail + intHeightFooter ' Determine form's width. intTotalFormWidth = frm.Width ' Determine window's height and width. intWindowHeight = frm.InsideHeight intWindowWidth = frm.InsideWidth If intWindowWidth <> intTotalFormWidth Then intWindowWidth = intTotalFormWidth End If If intWindowHeight <> intTotalFormHeight Then intWindowHeight = intTotalFormHeight End IfSub