Solved

Screen Resolution

Posted on 1997-12-09
8
2,393 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
8 Comments
 
LVL 7

Accepted Solution

by:
spiridonov earned 100 total points
ID: 1961859
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
ID: 1961860
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
ID: 1961861
If i had them, i would for sure have posted them.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:RomeFu12
ID: 1961862
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
 

Author Comment

by:RomeFu12
ID: 1961863
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
ID: 1961864
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
ID: 1961865
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
ID: 1961866
I guess you couldn't post these functions/modules here ?
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

759 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