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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

INTERFACE ISSUES

Status
Not open for further replies.

rabbithole

Programmer
May 5, 2000
8
AU
    Looking for some wise counsel in regards to creating an application interface that adapts to the particular size and resolution of any given monitor. Any information about general industry trends in this matter would be greatly appreciated. Useful book or website information would also be appreciated. Finally,any personal hints and information regarding the issues involved in creating such an interface as well as some easy yet effective and efficience ways to accomplish this task would be great.
 
if you are looking for something that would be suited for a course, like best known ways to apease someone through the looks of the interface, I cannot help you there, but far as programming the interface, you can dynamically set it up if you have to , by that I mean set the width to be a percentage of the screen, which results in sizing everything else to a particular need, or create multipaging system with different optional interfaces, in other words, I am not quite sure what kind of interface you are trying to aim at. <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML, ASP(somewhat), QBasic(least i didnt start with COBOL)
 
kb,<br><br>I am writing a database application that will be sold retail<br>sometime in the future. At the moment I have only a 15&quot; monitor - so my interfaces are geard at suiting this size.<br><br>Because this particular application will be sold at some time down the track I am wanting to create it in such a way that an prospective clients will fully benefit from an interface that resizes to their particular monitor size ect.<br>eg: 17 or 22&quot; monitors.<br><br>I am still a little new to interface design so I am ignortant. In creating a interface on an 15&quot; monitor I just don't want it to small or unproportioned for a 17&quot; or larger monitor. Instead I am seek to write the application in such a way that the interface perfectly suits any size of monitor<br><br>That what I am seek to do.<br><br>Thanx for your reply<br><br><br>PS. Any further help from anyone including yourself would be great.<br>
 
WHOA! You don't write applications to a particular monitor size, you need to check the resolution that the user is running at.&nbsp;&nbsp;For example, on a 15 inch monitor, the user might be in 640x480, 800x600, or 1024x768.&nbsp;&nbsp;You also need to consider whether the system is using large fonts, small fonts, or a custom font size.<br><br>Hint:&nbsp;&nbsp;You really need to look at TwipsPerPixelX,TwipsPerPixelY, ScaleMode, ScaleX, ScaleY, etc. <p>nick bulka<br><a href=mailto:nick@bulka.com>nick@bulka.com</a><br><a href= > </a><br>
 
You can make this issue really complicated, but here is my take on a straitforward approach to the problem:<br><br>1. Decide on a lowest common denominator for the resolutions you will support.&nbsp;&nbsp;If you think it's possible someone running this app will actually use 640x480, then start off with that.&nbsp;&nbsp;If it was me, I would assume 800x600 unless I knew I would be selling this to a lot of people using old computers with 14 inch monitors.<br><br>2. Set you resolution to that lowest size you chose, and build your forms, so you won't put more content on each form that what will show at that resolution.<br><br>3. Once you have the forms built, review each form to see what fields could be more helpful if they were larger.&nbsp;&nbsp;For example, if a form has a listbox, grid, listview, treeview, etc., then the user would see more information if you made it larger, so this is a form you'll want to add resize logic into.<br><br>4. To create resize logic, add code to the form_resize event and reference the size of the inside of the form, me.scalewidth and me.scaleheight.&nbsp;&nbsp;Use these values to modify the values of your control.&nbsp;&nbsp;For example, if a grid fills the bottom and right side of a form, with a border of 240 pels, your code would say:<br><br>const cMargin = 240<br>grid1.height = me.scaleheight - (grid1.top + c_margin)<br>grid1.width = me.scalewidth - (grid1.left + c_margin)<br><br>This is the general idea of using resize code, but it can get a lot more tedious and complicated depending on the complexity of a form.&nbsp;&nbsp;For example, if the above form has a grid but there are buttons below it that you want to line up with the right side of the form, then put the buttons on a frame and make the frame invisible by turning the border off.&nbsp;&nbsp;Then add code to move the frame to the bottom right corner when the form is resized.&nbsp;&nbsp;When you adjust the height of the grid, subtract the height of the frame in addition to the top of the grid and the margin (margin times 2 to leave a margin above and below the buttons).<br><br>Once you have some of this code written, change your resolution and test.<br><br>As far as checking for small, large or custom fonts, this is probably overkill.&nbsp;&nbsp;If anyone is using large or custom fonts on a computer, and they have the resulution set low, they'll have trouble with many applications, not just yours.<br>
 
Or....<br><br>Don't do any of this hard work stuff.<br><br>Be lazy, get more done.<br><br>There are container controls that do all of the hard work for you. VSFlex is one.<br> <p>Mike<br><a href=mailto:Mike_Lacey@Cargill.Com>Mike_Lacey@Cargill.Com</a><br><a href= Cargill's Corporate Web Site</a><br>Please don't send me email questions without posting them in Tek-Tips as well. Better yet -- Post the question in Tek-Tips and send me a note saying "Have a look at so-and-so in the thingy forum would you?"
 
The above answer is fairly typical of me &lt;smile&gt; <p>Mike<br><a href=mailto:Mike_Lacey@Cargill.Com>Mike_Lacey@Cargill.Com</a><br><a href= Cargill's Corporate Web Site</a><br>Please don't send me email questions without posting them in Tek-Tips as well. Better yet -- Post the question in Tek-Tips and send me a note saying "Have a look at so-and-so in the thingy forum would you?"
 
rabbit,<br>Long ago I saw (and used) a procedure written I believe, by Access Guru Ken Getz that did this sizing.&nbsp;&nbsp;I looked at it, (and I believe he warned as much) as an acedemic exersize.&nbsp;&nbsp;This type of pixel manipulation and real-time control resizing can never be perfect.&nbsp;&nbsp;If you would like a copy I'll post it here.&nbsp;&nbsp;However....<br><br>...another approach that I used in a small app (a big app would be too much work), was to create copies of the forms (my app had only a dozen or so) and then manually resize one for large res, one for small.&nbsp;&nbsp;On open, either use an api to get the device resolution, or prompt the user, then do a loop through the Documents collection (can't use Forms cause they're not open yet) and just do a rename, ie:<br>(assuming the forms start in 'small' mode:<br>This is the pseudo code:<br>If varChosenSize = Big Then<br>&nbsp;&nbsp;&nbsp;&nbsp;rename frmMain to frmMainSmall<br>&nbsp;&nbsp;&nbsp;&nbsp;rename frmMainBig to frmMain 'now the 'real' form is the big one<br>Else<br>&nbsp;&nbsp;&nbsp;&nbsp;rename frmMain to frmMainBig<br>&nbsp;&nbsp;&nbsp;&nbsp;rename frmMainSmall to frmMain 'here the 'real' form is small<br>End If<br><br>For apps with a few forms, that are stable (ie you're not changing code every day), this will work and work well.&nbsp;&nbsp;You need to decide if the extra work is worth it.<br><br>--Jim
 
...About my last post on the resizing--I forgot I was in the VB forum, that was an Access app in which I did that, I never did it in VB, so I'm not sure if the same general logic will do.&nbsp;&nbsp;&nbsp;Something similar my indeed work in vb, but I'm just not sure...sorry,<br>--Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top