Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / October 2005

Tip: Looking for answers? Try searching our database.

Resolution

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DJ - 14 Oct 2005 17:18 GMT
Is there a way to find the resolution being used in Access threw code?  I do
not want to change the appearance of the form, rather give the user a
message that the application is best viewed at 1024 x 768.  I do not want
the message to appear for everyone, as that can be annoying, only for users
who have a resolution smaller.

Thanks,

DJ
Douglas J Steele - 14 Oct 2005 17:31 GMT
Copy the following into a module:

' *** Start Copy

Private Declare Function GetSystemMetrics Lib "user32" ( _
   ByVal nIndex As Long _
) As Long

Const SM_CXSCREEN = 0 'X Size of screen
Const SM_CYSCREEN = 1 'Y Size of Screen

Function ScreenRes() As String

   ScreenRes = GetSystemMetrics(SM_CXSCREEN) & " x " & _
       GetSystemMetrics(SM_CYSCREEN) & " pixels."

End Function

' *** End Copy

Make sure you don't name the module ScreenRes.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> Is there a way to find the resolution being used in Access threw code?  I do
> not want to change the appearance of the form, rather give the user a
[quoted text clipped - 5 lines]
>
> DJ
AccessHelp - 14 Oct 2005 17:46 GMT
Douglas,

What does your coding do?  Thanks.

> Copy the following into a module:
>
[quoted text clipped - 29 lines]
> >
> > DJ
Douglas J Steele - 14 Oct 2005 19:42 GMT
It returns the current screen resolution, like DJ wanted.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> Douglas,
>
[quoted text clipped - 33 lines]
> > >
> > > DJ
AccessHelp - 14 Oct 2005 20:42 GMT
Hi Douglas,

Where do I paste your coding in my database, and where do I see the return
of the current screen resolution?

I pasted your coding in a new module.  Is it right?

Thanks.

> It returns the current screen resolution, like DJ wanted.
>
[quoted text clipped - 37 lines]
> > > >
> > > > DJ
Douglas J Steele - 14 Oct 2005 20:46 GMT
Yup, paste it in a new module, and make sure you don't name the module
ScreenRes (since that's the name of the function in it)

Go to the Immediate Window (Ctrl-G), type

?ScreenRes

and hit enter.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> Hi Douglas,
>
[quoted text clipped - 46 lines]
> > > > >
> > > > > DJ
DJ - 14 Oct 2005 17:50 GMT
Awesome function!

Thanks Doug.

> Copy the following into a module:
>
[quoted text clipped - 29 lines]
>>
>> DJ
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.