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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

screen resolution

Status
Not open for further replies.

marct

Programmer
Apr 6, 1999
32
US
I am writing an MS Access97 application in which I need to know what screen resolution the computer is using when the app opens. I can't seem to find anything in access that will allow me to retreive this information. Any suggestions? Thanks.
 
Try calling Windows Api with the following function:<br>
<br>
Public Declare Function GetGraphicsMode Lib "gdi32" Alias "GetGraphicsMode" (ByVal hdc As Long) As Long<br>
<br>
That should do.<br>
<br>
-puremagic
 
oops, tested it myself after I've written the first message, and it's just giving you a mode flag for 16/32 bit, sorry about this...<br>
have to dig for a solution here - in VB6 there is a sysinfo control, but I don't know if there is something similar being shipped with access....<br>
<br>
puremagic
 
<br>
' From Access 97 Developer's Handbook<br>
' by Litwin, Getz, and Gilbert (Sybex)<br>
' Copyright 1997. All rights reserved.<br>
<br>
' Find the number of pixels in both directions on the ' Screen, (640x480, 800x600, 1024x768, 1280x1024?). This<br>
' also takes into account the size of the task bar, wherever ' it is.<br>
<br>
intScreenX = adh_apiGetSystemMetrics(adhcSM_CXFULLSCREEN)<br>
intScreenY = adh_apiGetSystemMetrics(adhcSM_CYFULLSCREEN)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top