Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

API for Display Property 2

Status
Not open for further replies.

rexc

MIS
May 22, 2003
33
PH
Hi guys! I need help....
Is it possible to call the Display property through code using API? Or is there any other code to call the Diplay Property?
Thanks.
RexC
 
Try this code.

Shell "rundll32 shell32,Control_RunDLL desk.cpl", vbNormalFocus
 
Are you just wanting to see the users screen resolution? If so this works good.

Dim reSolutionWidth As Integer
Dim reSolutionHeight As Integer

reSolutionWidth = Screen.Width / 15
reSolutionHeight = Screen.Height / 15
 
Better would be:


reSolutionWidth = Screen.Width / Screen.TwipsPerPixelX
reSolutionHeight = Screen.Height / Screen.TwipsPerPixelY
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top