VB.Net 2005: Autoscroll in panel control

k3n51mm

Active member
Joined
Mar 7, 2007
Messages
40
Programming Experience
3-5
As part of a wizard-type application, I am loading forms into a panel control inside another form.
The panel is set to autoscroll. Some of the forms require vertical scrolling. However, when running the app on a computer with a monitor whose resolution is 1024 x 768, the scroll bar does not give access to the entire form - the bottom 1/3 is cut off and cannot be scrolled to. My development machine has a considerably higher resolution - maybe that had something to do with this. How do I fix this? I thought Autoscroll meant autoscroll and that was it.
 
I have had the same problem with developing aplications, i have a widescreen laptop and a normal resolution screen. when developing on one, i cannot view properly on another.

The problem is basicaly that when you design the form, you specify all form and control sizes in pixels. Wen less pixels are available on the screen, it only shows the top left corner of the form.

The workaround I found for this was under initializecomponent, to find the users screen res (screen.primaryscreen.bounds.height (or width)(dont use x and y)), and for each control in the form, do a ratio calculation and resize all the controls accordingly. THere may well be a better way to do this, but this was my solution.
If you have groupboxes (and panels probably) then you will need to resize all the controls within theem individualy
 
Back
Top