Solved

800x600 app displaying at 1000x750

Posted on 2002-03-04
25
197 Views
Last Modified: 2010-05-02
for some reason, this app that I built displays fine on 10 machines that I tested it on.

However, when I run it on this one machine, it runs at 1000x750!!!

Any ideas?
0
Comment
Question by:webmanager
  • 9
  • 7
  • 6
  • +3
25 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 6839176
Is the machine set to run at that resolution (1000 x 750)?

The VB application will run at the resolution of the machine it is on.  Unless you wrote special code to change the machine resolution, the applicatiion will not change the machine resolution.

mlmcc
0
 
LVL 18

Expert Comment

by:mdougan
ID: 6839212
Another thing that affect appearant resolution is the use of Large Fonts.  If this is selected in the Display Settings, then even if the resolution is set to 800X600, the windows will appear on screen as if the user were in 640X480 mode.

That's sort of the opposite of your problem, unless those 10 machines have Large Font selected and this one machine does not (and all computers are really set in 1000X750 mode).
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 6840315
You can also choose small fonts and in some cases set your own % increase or decrease.

mlmcc
0
 

Author Comment

by:webmanager
ID: 6840777
I have tested the app in 1024x768......1280x1024.....1600x1200...  it never resized on any machine......it was always 800x600.....  it's just on that one machine.  He's running at 1280x1024....
0
 

Author Comment

by:webmanager
ID: 6841378
oh...  it doesn't resize the screen resolution.....  I built the form to be 800x600..  it's just a window..
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 6846281
What do you mean the app resizes?

mlmcc
0
 

Author Comment

by:webmanager
ID: 6847104
ok....

apparently this person has "large fonts" enabled...which is causing the problem.  Is there a way in VB to program an app to use "small fonts"?
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 6849592
None that I know of.  We have a similar problem with som eof our users.  Most use the default - normal fonts at 800x600 or 640x480.  Some have large (>20") monitors and use 1024x768 or larger with large fonts.  

We had two choices
1.  If a user wanted to use our app they would have to resize their resoultion to at most 800x600

2.  We could add a resizer on the form and set a maximum and minimum size for each form which was set on form load.

We chose 2 - a lot of work on our part but more convenient to the users.

good luck
mlmcc
0
 
LVL 18

Expert Comment

by:mdougan
ID: 6849655
Ahem... didn't I mention the large fonts a few days ago ;)

I don't think you could or should, try to change a person's display settings in a application.  I know that there is a way to tell, but it requires some calculation.  See, the resolution stays high, but the number of characters that can fit on the screen is drastically reduced, so, if you get the textmetrics and do some calculations with the screen width, you can usually tell.  Then, once you know you're in Large Font mode, you might size your screen differently or use a different set of graphics.

Personally, we most often adopt the position that we support specific display properties, and if someone is using something outside of that, well, they can suffer the consequences.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 6852315
After the trouble we had with our application to get it to resize, future applicatiions will probably be built to a specific resolution and users will have to adjust.

One thing I would recommend would be to have either a close X on the top or a close button that can be reached with the TAB key so  auser doesn't get trapped .

good luck
mlmcc
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 6852318
In looking through old mail I found a link to a PAQ that suggested looking at the following link.

http://www.lyoung.com/

the PAQ is at

http://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20253517


good luck
mlmcc
0
 
LVL 18

Accepted Solution

by:
mdougan earned 25 total points
ID: 6852815
What I normally do is find out the minimum resolution of the majority of my user base (if there is one guy out in Cleveland who's running 320X240 that's his problem).  

Let's say that it's 800X600.  Then, I try that resolution with large fonts, and I'll learn that 800X600 Large Fonts = 640X480 Small Fonts.  So, if I want the majority of my users to be able to fit my window on the screen, I either have to verify that they all use small fonts and design the screen at 800X600.  Or, if there is a lot of people using Large Fonts, then I have to design the screens at 640X480.

For people at 800X600 small fonts, the window wont fill the screen, people at 800X600 Large Fonts or 640X480 Small Fonts the windows will pretty much fill the screen.

Then, I use an elastic control such as the one from VideoSoft - VSOCX (now the company is called ComponentOne at www.componentone.com).  The elastic control gives me a lot of flexablity in sizing things on the screen, so, the person in 800X600 small fonts can maximize their screen, and get more room to view tables or lists or whatever my app has.  This is further improved by providing "splitters" that let the user resize certain portions of the screen.  Always develop using the lowest resolution, and then rely on the elastic to size the controls larger for people at a higher resolution.  It doesn't work well the other way around.

The only thing that Large Fonts will mess up is the text inside of lables.  If you can make your button or lable substantially larger than the text that goes inside, you might have an acceptable look.  If not, you can use graphics for your button instead of text.  A button with a picture of "OK" will look the same size on large or small fonts (though the button the picture is on may be larger in large font mode).

If you want to detect Large Font mode through VB, here is a link to a knowledgebase article on the topic.

http://support.microsoft.com/default.aspx?scid=kb;EN-US;q152136

Of course, the solution to your problem is just to get this one user to switch to small fonts.....
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

Author Comment

by:webmanager
ID: 6856484
I appreciate all your help....  I have finally convinced the user to change their font size when displaying the app to clients.

lol....took a long time to convince him.
0
 
LVL 18

Expert Comment

by:mdougan
ID: 6858890
Great!  So, this answers your original question?
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 6859211
mdougan
WIll the code or similar code work for Win 2K?

mlmcc
0
 
LVL 18

Expert Comment

by:mdougan
ID: 6859703
As far as I know, it should work fine.  I know of no changes in W2K that should affect it.
0
 

Expert Comment

by:mgrover30
ID: 6864314
'code for adjusting to any screen area
' place any five controls into the form
' copy the code into module

Option Explicit
Type ControlProportions
    WidthProportion As Single
    HeightProportion As Single
    TopProportion As Single
    LeftProportion  As Single
End Type
Dim ArrayProportions() As ControlProportions

'Function for Storing the properties of control of form
Public Function CallProportion(My As Form)
    ReDim ArrayProportions(0 To My.Controls.Count - 1)
    MsgBox ("No. of Controls in form = " & My.Controls.Count)
    Dim I As Integer
    On Error Resume Next
   
    For I = 0 To My.Controls.Count - 1  'UBound(ArrayProportions)
        If TypeOf My.Controls(I) Is Timer Then
            ' Do Nothing
        ElseIf TypeOf My.Controls(I) Is ComboBox Then 'CommonDialog Then
            ' Do Nothing
            With ArrayProportions(I)
                .WidthProportion = My.Controls(I).Width / My.ScaleWidth
                .HeightProportion = My.Controls(I).Height / My.ScaleHeight
                .LeftProportion = My.Controls(I).Left / My.ScaleWidth
                .TopProportion = My.Controls(I).Top / My.ScaleHeight
            End With
        Else
            With ArrayProportions(I)
                .WidthProportion = My.Controls(I).Width / My.ScaleWidth
                .HeightProportion = My.Controls(I).Height / My.ScaleHeight
                .LeftProportion = My.Controls(I).Left / My.ScaleWidth
                .TopProportion = My.Controls(I).Top / My.ScaleHeight
            End With
        End If
    Next
End Function

Public Function ReCallProportion(My As Form)
    Dim I As Integer
    'MsgBox "From ReCallProportion  " & My.ScaleHeight
    For I = 0 To My.Controls.Count - 1
        If TypeOf My.Controls(I) Is Timer Then
            ' Do Nothing
        ElseIf TypeOf My.Controls(I) Is ComboBox Then ' CommonDialog Then
            ' Do Nothing
             My.Controls(I).Move ArrayProportions(I).LeftProportion * _
                My.ScaleWidth, _
                ArrayProportions(I).TopProportion * My.ScaleHeight, _
                ArrayProportions(I).WidthProportion * My.ScaleWidth ', _
               ' ArrayProportions(I).HeightProportion '* My.ScaleHeight
        Else
            My.Controls(I).Move ArrayProportions(I).LeftProportion * _
                My.ScaleWidth, _
                ArrayProportions(I).TopProportion * My.ScaleHeight, _
                ArrayProportions(I).WidthProportion * My.ScaleWidth, _
                ArrayProportions(I).HeightProportion * My.ScaleHeight
        End If
    Next
End Function

Public Sub ToCode()
    MsgBox ("From code module")
End Sub

Public Function MyCall(My As Form)
     My.Print "From Code Module"
End Function


' write a following code into a foem

Private Sub Command1_Click()
    Call ToCode
    Call MyCall(Me)
End Sub

Private Sub Form_Load()
'    Show
    Call CallProportion(Me)
End Sub

Public Sub Form_Resize()
    Call ReCallProportion(Me)
End Sub
0
 
LVL 18

Expert Comment

by:mdougan
ID: 6866430
mgrover30,

I can see that you're new to EE.  The custom here is to post all proposed solutions as comments.  Then, after some dialog with the questioner, if the questioner is satisifed that your comment solved their problem then they will accept your comment as an answer.

By proposing your solution as an Answer, you Lock the question, which moves it to a list that hardly any Experts ever look at, which means that you have made it doubtful that webmanager is going to get any new help on this question unless he rejects your solution.
0
 

Author Comment

by:webmanager
ID: 6867654
if I reject this answer now, can I accept it as an answer later?
0
 
LVL 18

Expert Comment

by:mdougan
ID: 6868231
Yes, and if not, you could always ask mgrover30 to resubmit it as an answer again.
0
 
LVL 18

Expert Comment

by:mdougan
ID: 6868239
However, what else are you waiting for?
0
 
LVL 18

Expert Comment

by:mdougan
ID: 6887052
Hello?
0
 

Author Comment

by:webmanager
ID: 6888461
I havn't had time to try this out....  I should have some time mid next week...   sorry for the delay....
0
 
LVL 12

Expert Comment

by:guidway
ID: 7306312
This question appears to have been abandoned. A Moderator will be asked to
close this question after seven days, with the following recommended
disposition:

Points to mdougan

If you have any comment or objection to the recommendation, please leave it here.

guidway
EE Cleanup Volunteer
0
 
LVL 5

Expert Comment

by:Netminder
ID: 7331670
Per recommendation, force-accepted.

Netminder
CS Moderator
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

758 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now