Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 209
  • Last Modified:

800x600 app displaying at 1000x750

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
webmanager
Asked:
webmanager
  • 9
  • 7
  • 6
  • +3
1 Solution
 
mlmccCommented:
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
 
mdouganCommented:
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
 
mlmccCommented:
You can also choose small fonts and in some cases set your own % increase or decrease.

mlmcc
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
webmanagerAuthor Commented:
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
 
webmanagerAuthor Commented:
oh...  it doesn't resize the screen resolution.....  I built the form to be 800x600..  it's just a window..
0
 
mlmccCommented:
What do you mean the app resizes?

mlmcc
0
 
webmanagerAuthor Commented:
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
 
mlmccCommented:
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
 
mdouganCommented:
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
 
mlmccCommented:
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
 
mlmccCommented:
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
 
mdouganCommented:
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
 
webmanagerAuthor Commented:
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
 
mdouganCommented:
Great!  So, this answers your original question?
0
 
mlmccCommented:
mdougan
WIll the code or similar code work for Win 2K?

mlmcc
0
 
mdouganCommented:
As far as I know, it should work fine.  I know of no changes in W2K that should affect it.
0
 
mgrover30Commented:
'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
 
mdouganCommented:
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
 
webmanagerAuthor Commented:
if I reject this answer now, can I accept it as an answer later?
0
 
mdouganCommented:
Yes, and if not, you could always ask mgrover30 to resubmit it as an answer again.
0
 
mdouganCommented:
However, what else are you waiting for?
0
 
mdouganCommented:
Hello?
0
 
webmanagerAuthor Commented:
I havn't had time to try this out....  I should have some time mid next week...   sorry for the delay....
0
 
guidwayCommented:
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
 
NetminderCommented:
Per recommendation, force-accepted.

Netminder
CS Moderator
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 9
  • 7
  • 6
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now