Public Sub SetFormSizeInInches(ByVal frm As Form, ByVal wid _
As Single, ByVal hgt As Single)
' Convert into twips. Add room for the border.
frm.Width = wid * 1440 + frm.Width - _
frm.ScaleX(frm.ScaleWidth, frm.ScaleMode, vbTwips)
frm.Height = hgt * 1440 + frm.Height - _
frm.ScaleY(frm.ScaleHeight, frm.ScaleMode, vbTwips)
End Sub
|