Screen Resolution

R

Ron Weiner

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top