Screen size

  • Thread starter Thread starter wayne.coldwell
  • Start date Start date
W

wayne.coldwell

Is there a way to programaticly read the screen size and
adjust the size of your form based on that reading. I
have seen some ways to do it in VB, but not Access 2002.
Am I barking up the wrong tree?

I have a program that when you put it on a 15 vs 17 or 19
inch monitor drastically changes the view.

Please Advise


Thanks

Wayne
 
Wayne,

I presume you are talking about screen resolution rather than size.

You have two choices. You can use
Screen.ActiveForm.WindowWidth/WindowHeight to find the size of the active
form. It the form is maximized this approximates to the screen size.

Alternatively you can use Windows API functions to detect the actual screen
size/resolution. This is obviously more complicated but is more accurate.
I think that the MS knowledge base has articles on how to do this.

Rod Scoullar
 
-----Original Message-----
Wayne,

I presume you are talking about screen resolution rather than size.

You have two choices. You can use
Screen.ActiveForm.WindowWidth/WindowHeight to find the size of the active
form. It the form is maximized this approximates to the screen size.
Thanks again Rod.

I am trying to see if it is worth it to change the screens
based on the Screen resolution. The latter of sugestions
is the way I should go if I am going to do this. I wish
there was an auto size built in. When you get into
putting graphics in your screens the different resolutions
destroy you.

I do appreciate your help

Wayne
 
Wayne,

There are third-party form scaling solutions available that might help:

A shareware version of a form rescaling module I wrote called
ShrinkerStretcher is available at this web site:
http://www.peterssoftware.com/ss2.htm

FMS has a sizer module at www.fmsinc.com.

The Access Developer's Handbook has form resizing code included:
http://www.amazon.com/exec/obidos/ISBN=0782119417/107-8064361-7403703

Hope this helps,

Peter De Baets
Peter's Software - MS Access Tools for Developers
http://www.peterssoftware.com
 
Back
Top