Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set Front-End Access (2k) App Window/Screen size 4

Status
Not open for further replies.

tsosiel

Programmer
Aug 10, 2001
42
US
Greetings all...

I am developing a front-end app in Access2000 and I'd like to set up the main window (Access itself) to be a certain dimension - regardless of user screen resolution. I'm not sure if this is possible... ???

I have users who's resolution is as low as 680 X 480 and high as 1600 X 1200!!! I'm developing for the low end, but when users MAXIMIZE the main window (Access), it takes up the entire screen and my main form shows up in the upper left corner - can't reffresh the "empty/unused" space.

Thank you in advance for any/all comments/hints.

- Lorentz
 
Hi

Try the Access Developers Handbook site, it has a resize function which may help you

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
A little more information:

You can't easily control the size of the Access application window. Nor should you; it's really up to the user to organize his desktop space, and taking that control away from him can be seen as anything from annoying to rude.

What you can do, though, is adjust the size of your forms to be more readable for the current screen resolution. It's not at all easy to do this, but there are commercial products that do it for you, as well as sample code in various books on Access VBA coding. Ken is directing you to one of the best of these books, the Access Developers' Handbook. The web site URL is
There's a link to form resizing code partway down the page, titled "Download form scaling/resizing utility".

Rick Sprague
Want the best answers? See faq181-2886
To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
 
I simply maximize the form if the screen resolution is set to what I sized the form for. If the resolution is > the what I designed the form for, I restore the form rather than maximize it. It works pretty well and is easy to do. Create a new module and add the following statement to it (or put it in the module you use for declaring global variables).

Declare Function apiGetSystemMetrics Lib "User32" Alias "GetSystemMetrics" (ByVal nIndex As Integer) As Integer

In the OnActive event of the form, add the following code (not 16=width, 17=height)

Private Sub Form_Activate()

If (apiGetSystemMetrics(16) <= 640) Then
DoCmd.Maximize
Else
DoCmd.Restore
End If

End Sub

 
In my haste to get to a meeting (which was postponed), I forgot to put the word public in the statement. The declaration statement should look like this:

Public Declare Function apiGetSystemMetrics Lib &quot;User32&quot; Alias &quot;GetSystemMetrics&quot; (ByVal nIndex As Integer) As Integer
 
All...

Thank you for the input!! I will try the code supplied by FancyPrairie.... and I skimmed the link - good one!

If I have any problems, I'm coming back to this link! Thanks again....

-Lorentz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top