Solved

Screen Resolution

Posted on 1997-12-09
8
2,371 Views
Last Modified: 2012-05-07
I have written a few custom apps in 1024 x 768 resolution which are now being transferred to laptops and older desktops supporting only 640 x 480 or 800 x 600 resolution. My question, Is there a conversion code module for Access ver. 2 that recognizes screen resolution and converts apps to the proper settings for various resolutions.Also does a newer version of Access address this problem, if so I will upgrade. Any help will be greatly appreciated and thanks in advance.
RomeFU12@aol.com ( John )
0
Comment
Question by:RomeFu12
  • 2
  • 2
  • 2
  • +1
8 Comments
 
LVL 7

Accepted Solution

by:
spiridonov earned 100 total points
Comment Utility
Here is a function from MS Knowledge base that gets screen resolution
1. Create a new module, and type the following Declarations and function:
 
      '
      *****************************************************************
      ' DECLARATIONS SECTION
 
      Option Explicit
 
      Type RECT
          x1 As Integer
          y1 As Integer
          x2 As Integer
          y2 As Integer
      End Type
 
      Declare Function GetDesktopWindow Lib "User" () As Integer
      Declare Function GetWindowRect Lib "User" _
         (ByVal hWnd As Integer, rectangle As RECT) As Integer
 
      '
      *****************************************************************
      ' FUNCTION: GetScreenResolution()
      ' PURPOSE:
      '   To determine the current screen size or resolution.
      ' RETURN:
      '   The current screen resolution. Typically one of the following:
      '      640 x 480
      '      800 x 600
      '      1024 x 768
      '
      *****************************************************************
      Function GetScreenResolution () as String
          Dim R As RECT
          Dim hWnd As Integer
          Dim RetVal As Integer
          hWnd = GetDesktopWindow()
          RetVal = GetWindowRect(hWnd, R)
          GetScreenResolution = (R.x2 - R.x1) & "x" & (R.y2 - R.y1)
      End Function
 
2. From the View menu, choose Immediate Window.
 
3. Type the following line in the Immediate window, and then press ENTER:
      ? GetScreenResolution()
The current screen resolution will be displayed in the Immediate window. If the current resolution is standard VGA, the following will be displayed in the Immediate window:    640x480

The functions to resize the form : glrScaleForm() and glrResizeForm() functions, written by Ken Getz, are
published in the following book:
    Microsoft Access 2 Developer's Handbook. Ken Getz, Paul Litwin,   Greg Reddick. Sybex: 1994 ISBN: 0-7821-1327-3
 These functions were also published  in Smart Access magazine.
   Article: "Create Resolution-Independent Forms in Access 2.0" by Ken Getz    Smart Access, June 1994

0
 
LVL 12

Expert Comment

by:Trygve
Comment Utility
spiridinov: If you have access to the resize functions please post them as comments as this would make this answer complete. Not everyone reading this answer can get hold of the book or magazine mentioned.
0
 
LVL 7

Expert Comment

by:spiridonov
Comment Utility
If i had them, i would for sure have posted them.
0
 

Author Comment

by:RomeFu12
Comment Utility
I have already been to the knowlege Base and have obtained the determining current screen resolution code.I have heard of this book but I am not able to locate a copy. Also I have intecepted E-Mail noting that the resize code module does exist and is out there somewhere in some experts module library. Anyone know where I can obtain a copy? And does a newer version of Access address this problem?
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:RomeFu12
Comment Utility
Pleae submit my question again to other experts after posting my comment.
Thanks again
RomeFU12@ aol.com    (John)
0
 
LVL 3

Expert Comment

by:fordraiders
Comment Utility
An Access97 database is now available on cd-rom, from the book: Access97 Developer's
Handbook third edition. page 474. The  access97 database is on the cd-rom with the book. "chap 08".
1. Make sure your fonts are scalable. (true type)
2. Put the modules from the cd-rom on all your forms "Open Event"
3. There are two:      basFormScale   and   bas FormGlobal.
Its a great book.
Hope this helps!
0
 
LVL 3

Expert Comment

by:fordraiders
Comment Utility
An Access97 database is now available on cd-rom, from the book: Access97 Developer's
Handbook third edition. page 474.SYBEX. The  access97 database is on the cd-rom with the book. "chap 08".
1. Make sure your fonts are scalable. (true type)
2. Include two modules to your database:  basFormScale   and   bas FormGlobal. from cd-rom
3. Declare a data structure in the form module of each form. To hold the size information of your form.
Dim rctOriginal As adhTypeRect
4. Attach  a call event to forms resize event "adhResizeForm"
5. Attach a call the the forms open event "adhScaleForm"
The rest is explained in full in the book
Its a great book.
Hope this helps!
0
 
LVL 12

Expert Comment

by:Trygve
Comment Utility
I guess you couldn't post these functions/modules here ?
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now