Screen Resolution

  • Thread starter Thread starter Guest
  • Start date Start date
Put the declare statement below in Declaration section of your startup form
or public module.

Public Declare Function GetSystemMetrics Lib "user32.dll" (ByVal nIndex As
Long) As Long

Then you can get the screen Resolution in the Load Event of your start up
form with the code below.

Dim x as Integer, y as Integer

x =GetSystemMetrics(0)
y = GetSystemMetrics(1)
MsgBox "Screen Resolution is " & x & " by " & y


Ron W
 
Back
Top