Solved

Screen Resolution

Posted on 1997-12-09
8
2,378 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
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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Familiarize people with the process of utilizing SQL Server views 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 Access…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

777 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