|
|
Title | Get the screen's current resolution |
Keywords | screen, resolution, size |
Categories | Graphics |
|
|
The Screen object's Width and Height properties give the screen size in twips. Its TwipsPerPixelX and TwipsPerPixelY properties give the number of twips per pixel in the horizontal and vertical directions. Divide twips by twips-per-pixel to get pixels.
|
|
Private Sub Form_Load()
Dim wid As Integer
Dim hgt As Integer
wid = Screen.Width \ Screen.TwipsPerPixelX
hgt = Screen.Height \ Screen.TwipsPerPixelY
Label1.Caption = Format$(wid) & " x " & Format$(hgt)
End Sub
|
|
|
|
|
|