Davids Learning

I usually work on my app on my laptop which is a wide screen, I have not installed my app on a desktop until this morning. I noticed that most of my forms that are not maximum size, that some of the contents are cut off.

I went back and tried several different ways of displaying the forms,sizeable,fixed,dialog, and it did not make a difference, I tried different way of calling the form, show or showdialog with the same effect.

How do you get a form to show the entire content

The ones with a table layout panel do fine, but some of my forms dont. Should I think about going back and using a layout panel on each or can what I am wanting be accomblished by code

DavidsLearning



Re: Visual Basic Language Forms not sizing properly

Dick Donny

Hi David,

Ideally you would probably want to change the layout/dimension of controls as a form changes size. This can probably be accomplished with layout panels, dock properties etc, but worst case you always have a form_resize event during which you can run code to alter control sizes and positions.

I'd definitely recommend you go back and change the problem forms so that they can accommodate different sizes. Your application will look far more polished and professional.





Re: Visual Basic Language Forms not sizing properly

SJWhiteley

This shows the importance of testing your application on other machines. Ordinarily, if you are targeting WinXP or greater, your forms should all be useable at 800x600 screen resolution (of course, it depends on the application). Another issue you may face is the font sizes may be increased on the target computer. This is really a pain in the neck to deal with.

As Dick Donny says, go back and fix the forms so they can accomodate different sizes. It's always handy to keep a low end computer around to test your applications on.






Re: Visual Basic Language Forms not sizing properly

Davids Learning

Thank both of you for responding to my problem.

I dont understand why if you are using a table layout panel that if its dock method is set to fill, why doesnt it do that requardless of the form size

Can either of you point me in a direction where I can learn how to accomadate any screen resolution

Davids Learning





Re: Visual Basic Language Forms not sizing properly

SJWhiteley

Davids Learning wrote:

I dont understand why if you are using a table layout panel that if its dock method is set to fill, why doesnt it do that requardless of the form size

It should do.... The table layout panel is designed to do what you need, I expect. You can also use the anchor properties of various controls, too. Can you give us an example of what it's doing for you that isn't quite right






Re: Visual Basic Language Forms not sizing properly

Davids Learning

I wished I knew how to insert a snapshot of the form, but I dont so I will try to explain.

The form has a tablelayout panel in it.

Properites as follows

Dock = Fill

Anchor = Top,Bottom,Left,Right

In that table layout panel at the top in row 1 is a datagridview.

The datagridview is anchored and docked the same as above

It column span is set to 3, for 3 columns

next are afew textboxes and lables

then you go to the bottom

In the bottom there is a panel, docked and anchored as above (used to define a different color at the bottom of the form)

The column span is 3

Inside that panel is a tablelayout panel,

Properites as follows

Dock = Fill

Anchor = Top,Bottom,Left,Right

There is a progressbar and 2 button

The buttons and progress meter is docked and anchored the same.

When the form is rendered on an older pc with 800x600 resolution

The form is cutoff at the middle of the buttons at the bottom

and the right of the form is cutoff by about an inch.

I am sure its got to do with how its displayed from different resolution

I did notice when VB05 Pro publishes the app, the programs form that you use to publish it with

does have a glitch in it on my laptop. The button on the far right of the form is partially cutoff.

I wonder if this is the same as to what I am seeing Except in the reverse order.

How do you get around that

i think I have done what I should

Thanks

Davids Learning





Re: Visual Basic Language Forms not sizing properly

kleinma

I design my apps so they will run property at 800x600, but since that is such a crappy low resolution, I usually really optimize it for 1024x768 or greater.

If the end user wants to run 800x600, then sometimes in some forms, a control or 2 might not fit, so I set the AutoScroll property of the form to true.

http://msdn2.microsoft.com/en-us/library/system.windows.forms.scrollablecontrol.autoscroll(vs.80).aspx


This will automatically add scrollbars to the form when it can't fit its entire size at the current resolution.

Sure the end user has to scroll, but Its better than nothing (hell just about every webpage you visit you have to scroll right )

Also I would not advise designing your apps for an 800x600 interface.

Have a look at these stats:

http://www.w3schools.com/browsers/browsers_stats.asp

At Jan 2007, only 14% of users were running 800x600, while 80% are running 1027x768 or higher. Sure this number may not be 100% accurate, but it should give you a good idea that 800x600 is slowly going away, just like 640x480 did. 19" LCD monitors for $150 has helped get people running at higher resolutions.






Re: Visual Basic Language Forms not sizing properly

Davids Learning

This is true, but the biggest majority of the pc here are of course dinosaurs.

I will take your advice unless someone produces something that will do what I'd like.

Wouldnt it be neat if it could be done Have an app that runs from 800x600 and up.

Thanks

Davids Learning





Re: Visual Basic Language Forms not sizing properly

SJWhiteley

Check your font size: if you are using a modern laptop with a high resolution (e.g. 1680x1050), it's possible that your display settings are set for large font size. Which means you will design it to look good on your PC but it'll look crappy on other PCs. Likewise check the other PCs.

Also, resize your application on your PC to see that it looks OK at a form size smaller than 800x600. I understand that most people don't run it that way, but you need to accept that your application must be useable at that resolution, if only for a short time. All the applications I design run at 800x600 and up, with a 'designed for' resolution of usually 1280x1024 - typical of most 19" monitors. Note that when windows (XP) is installed, the resolution it runs is 800x600 by default...

I tried replicating what you have, but can go pretty small with the items you describe...I do suspect the font size settings...