GefScreen.Width (property)

Gets and sets the width of the screen window in pixels.
Syntax: long = object.Width
object.Width = long
Description: The Width property gets and sets the width of the screen window in pixels.

Note: GefScreen.Width returns the width of the screen's window in pixels. GefScreen.Object.Width returns the size of the screen object in TWIPS regardless of the window size.

Example:

Sub GefScreen_Width()
    
    Dim oCimScr As GefScreen
    Dim strMessage As String
    Set oCimScr = CimGetScreen
    
    strMessage = "The width of the screen window is " & oCimScr.Width & " pixels" & Chr$(10)
    strMessage = strMessage & "where the screen object has a width of " & oCimScr.Object.Width / 20 & " pts"
    MsgBox strMessage
    
End Sub