473,406 Members | 2,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

How to adapt an application to use the resolution of the target environment?

547 512MB
I need some advice about the screen resolution of one of my apps, that i am rewriting currently from scratch. (i must admit - it was my first ever app i did 3 yrs ago, and was badly written)
I started doing programming it on my 23" flat screen at home(1920x1080), and now it is proportionally wrong on the old conventional box screens (1024x768), when i take it to work. I have to make everything much smaller in the application to make it fit.
Any suggestions on how to deal with this issue please?
Jul 5 '13 #1

✓ answered by ADezii

The appropriate answer would be to write Resolution Independent Code which will work properly at any Resolution but can become rather complex since all Controls would have to be dynamically resized. A simpler approach that I have taken in the past, assuming only a couple of Forms are utilized, is to check the Screen Resolution at the very beginning and show a specific Form depending on the outcome. Pseudo Code would look like:
Expand|Select|Wrap|Line Numbers
  1. If Horizontal Resolution is <= 1280 and Vertical Resolution <=1024 Then
  2.   'Show Form A
  3. Else
  4.   'Show Form B
  5. End If

5 1402
neelsfer
547 512MB
i have changed the screen resolution to 1280x1024 and it seems much better. Is there a way to adapt the vba to work at this resolution on opening, and revert back to the previous settings on closing the application?
Jul 5 '13 #2
Rabbit
12,516 Expert Mod 8TB
I suppose you could pull the screen resolution at start and then loop through all the controls and multiply their width by a percentage.
Jul 5 '13 #3
ADezii
8,834 Expert 8TB
The appropriate answer would be to write Resolution Independent Code which will work properly at any Resolution but can become rather complex since all Controls would have to be dynamically resized. A simpler approach that I have taken in the past, assuming only a couple of Forms are utilized, is to check the Screen Resolution at the very beginning and show a specific Form depending on the outcome. Pseudo Code would look like:
Expand|Select|Wrap|Line Numbers
  1. If Horizontal Resolution is <= 1280 and Vertical Resolution <=1024 Then
  2.   'Show Form A
  3. Else
  4.   'Show Form B
  5. End If
Jul 5 '13 #4
TheSmileyCoder
2,322 Expert Mod 2GB
Access 2007+ has the feature of anchoring. The basic concept is that you tell access which corner of the each control is fixed, and if you want the control to stretch when the form is resized.
The issue is that there is no bulletproof way for any code to know which objects should resize.

There are rule of thumbs probably, like comboboxes should not resize. But what about textboxes? If you are using it for a date value, you probably don't want it resized because you have prepared it for whatever size will fit a date. On the other hand if your textbox is bound to a memo field, you might want it to expand, since memo fields are usually for large blocks of text.

Anyway, using anchoring in 2007+ is a nice fit for most of these needs, and with no code required.
Jul 7 '13 #5
dsatino
393 256MB
For Rabbits resize method:

I've tried this method. It can work, but everything get very quirky looking. Sometimes even 'cartoony', for lack of a better phrase. I wouldn't recommend it.
Jul 9 '13 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Krzysiek | last post by:
Hello. I have application in VB working with db (AS400). When I had Client Access 4.4 everything worked OK but now after migration to CA5.1 it is not. When I run application from VB environment...
4
by: Barry Young | last post by:
I have Access 2000 installed on a machine and I create the MDE just fine. When I copy the MDE file over to another machine that has Access 2000 installed, the references are hosed and I get unable...
1
by: Jaco | last post by:
Hey, Do someone have any ideas to make my application resolution independent. Or some links to articles. Thanks, Jaco
1
by: Brendan Miller | last post by:
I am trying to close my application using Application.exit() in the frmMain_Closing event. When the form closes the process does not. My application only has one form (no other classes either). ...
1
by: Ioannis Vranos | last post by:
I am currently reading a chapter involving multithreading, and some sample code calls Environment::Exit() to terminate the application with all threads. What is the difference from...
1
by: mavrick101 | last post by:
I have an application that I developed on one machine(lets call it machine1) and now I'm trying to move to another machine(machine2). I copied all the files to the new machine (machine2) and tried...
7
by: aviad | last post by:
I am writing a Form application I need it to fit both resolution of 1600*1200 and 800*600 (and any other resolution that might jump in) the application is meant for regular PCs another question...
8
by: v4vijayakumar | last post by:
Lot of changes are happening to c++, nowadays. Even after the standardization, we see many interesting things, like, threading, regex, rope, etc. I read some TR1 and TR2 proposals, and I am not...
1
by: sudhivns | last post by:
Hi, I have an application which uses both Redemption.dll(which is X86 compatible) and Microsoft.Data.SqlRemoteBlobs (which is X64 compatible). I need to run this application in platform...
8
by: usr123 | last post by:
Hello all, I am new to ASP, i am trying to make changes in exsiting ASP application running on IIS on the server. I have copied the content onto my local. Now i want a dev environment to open up...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.