Solved

dynamic screen resolution for a vb install

Posted on 2004-08-27
5
221 Views
Last Modified: 2013-12-25
Here is a good one.

I created an application in vb6 that manages data and information from an access database.  On my machine, I can install and run the exe and it "looks" just as nice as in debug.  But I sent it to a tester and on his computer, the windows are not the same as on my machine.  there are text boxes that are off the screen...just does not look right.  How can I set the properties of the project so that it "looks" the same accross operating systems and computers?

Thanks.
0
Comment
Question by:MikeORTEC
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 27

Assisted Solution

by:Dabas
Dabas earned 200 total points
ID: 11919574
Hi MikeORTEC:
I suspect you are developing on a system with a 17" Monitor (or maybe even 19"), while your tester probably is using a smaller monitor than yours.
By right clicking on any place on your desktop and clicking on Properties, and then Settings, you can find out the resolution of your screen, (and the one of your tester)
Assuming yours is 1024 X 768, and your tester is 800 X 600, you will have to change your form so that it will fit on the latter.

To do that, in Visual Basic, click on View, Form Layout Window. Run your program and return to design mode.
The form layout window will have appeared docked on the right hand side of your screen, and will guide you on how to size your forms for lower resolutions than what you are developing on.

Good luck!

Dabas
0
 

Author Comment

by:MikeORTEC
ID: 11920658
Thanks Dabas.  That makes sense and is thankfully simpler that I thought it would be.  I developed the application on a laptop with an overly wide screen...unusal screen dimensions.  From the design environment Form View layout I am using the grid guides to relook at position and size of forms.  It appears that there are limits for screen resolution.  Is there a way to detect screen resolution on install (or first use) and ask the user to set it to a value?
0
 
LVL 7

Accepted Solution

by:
OHDev2004 earned 100 total points
ID: 11922402
sorry for Putting my nose in this :P but it's Dabas's Effort in the End he started the path :P...

yes you can .. there is a Command called Screen where you can retrieve several information About the screen ..
so if you want to know the Resolution you can do the Following:

Dim ResolutionX As Integer, ResolutionY As Integer
ResolutionX = Screen.Width / Screen.TwipsPerPixelX
ResolutionY = Screen.Height / Screen.TwipsPerPixelY
MsgBox "your Current Resolution is " & ResolutionX & "X" & ResolutionY

this will store the screen resolution Horizontal(ResolutionX) and Vertical(ResolutionY) and you can Compare it ...
so whenever the resolution is Larger than the Original one you developed on let's say it's 1024*768 and the detected Resolution is Larger like 1280*1024 so there's no need to tell the User to change the Resolution ...
the only state where the user needs to change the resolution if the detected one is Smaller than the one you developed the program on ...

OHDev
0
 
LVL 27

Assisted Solution

by:Dabas
Dabas earned 200 total points
ID: 11923406
Mike:
I agree with OHDev's reply with a few extra notes:

1) Although you CAN find out the resolution, I do not think it is a good idea to ask anybody to change their settings.
If their settings are lower than yours, there probably is a reason. (Maybe their monitor is a 15", and the font becomes so small that it is nearly unreadable, or the user is visually impaired and prefers to have the larger fonts?)

2) As suggested before, you should convert your forms to a lower resolution. (800 X 600 is quite universal now, I doubt anbyody is still using the lower 640 X 480)
If you have so many controls that it does not fit, then I suggest you use one of the two tab controls (I personally prefer the Microsoft Tabbed Dialog Control).
If you like the form to be maximized and the controls spread evenly, then play around with the control's left and top properties to do so. (The Form_Resize event would be the best place to have code to do that)

Dabas
0
 

Author Comment

by:MikeORTEC
ID: 11950636
Thanks for your help!  I split the points and appreciate the thoughtful comments.


Mike
0

Featured Post

Want Experts Exchange at your fingertips?

With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses
Course of the Month4 days, 2 hours left to enroll

630 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