Solved

Screen Resolution

Posted on 1997-12-09
8
2,384 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

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

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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…

840 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