Syntax |
Screen.DlgBaseUnitsY |
Description |
Returns an Integer used to convert vertical pixels to and from dialog units. |
Comments |
The number returned depends on the name and size of the font used to display dialog boxes. To convert from pixels to dialog units in the vertical direction: (YPixels * 8) + (Screen.DlgBaseUnitsY - 1) / Screen.DlgBaseUnitsY To convert from dialog units to pixels in the vertical direction: (YDlgUnits * Screen.DlgBaseUnitsY) / 8 |
Example |
This example converts the screen width from pixels to dialog units. Sub Main() YPixels = Screen.Height conv% = Screen.DlgBaseUnitsY YDlgUnits = (YPixels * 8) + (conv% -1) / conv% MsgBox "The screen width is " & YDlgUnits & " dialog units." End Sub |
See Also |
Screen.DlgBaseUnitsX (property). |
S |