Microsoft KB Archive/822497

= Controls are not displayed on Windows Forms that are larger than the screen resolution =

Article ID: 822497

Article Last Modified on 5/16/2007

-

APPLIES TO


 * Microsoft Visual Basic .NET 2003 Standard Edition
 * Microsoft Visual Basic .NET 2002 Standard Edition

-





SYMPTOMS
When you run a Microsoft Windows application, a Windows Form that is larger than the screen resolution may not display all the controls. For example, if your Windows Form is 1024 X 768 and your screen resolution is 800 X 600, you may not able to see all the controls on the form.



CAUSE
This problem occurs because a Windows Form display on the screen is restricted to the current screen resolution settings. Therefore, the controls on a Windows Form are not displayed if you put the controls in a location that exceeds the current screen resolution settings. However, the controls are added to the Windows Form.



WORKAROUND
To work around this problem, enable the AutoScroll property of the Windows Form. To do this, follow these steps:
 * 1) In the Windows Form Designer, right-click the form and then click Properties.
 * 2) In the Properties window, set the AutoScroll property to True.

A scroll bar is added to the form. You can use the scroll bar to work with the controls that were not previously displayed.



STATUS
This behavior is by design.



Steps To Reproduce the Behavior

 * 1) Start Microsoft Visual Studio .NET 2002 or start Microsoft Visual Studio .NET 2003.
 * 2) On the File menu, point to New, and then click Project.
 * 3) Under Project Types, click Visual Basic Projects or click Visual C# Projects.
 * 4) Under Templates, click Windows Application.
 * 5) In the Name text box, type Test Application, and then click OK.

By default, Form1 is created.
 * 1) Right-click Form1, and then click Properties.
 * 2) Set the Size property to 1036, 780 or set the Size property to a value that is greater than your screen resolution value.

Note If the current screen resolution is 1024 X 780, set the Size property of the form to 1036, 780.
 * 1) Add four Button controls to Form1, and then put one Button control on each extreme corner of Form1.
 * 2) On the File menu, click Save All to save the project.
 * 3) On the Debug menu, click Start to run the project.

The control may not be correctly displayed. If you try to maximize the form, the bottom corner control may not be visible.
 * 1) Right-click Desktop, and then click Properties.

If you cannot reproduce the problem, follow these steps to set the screen resolution:
 * 1) On the Display Properties window, click Settings.
 * 2) Locate the Screen area section or loctate the Screen resolution section, and then move the slider to set the resolution to less than the current settings. For Example, if the current screen area is 1024 X 760 pixels, change the screen area to 1024 X 600 pixels.
 * 3) Click OK.
 * 4) Open the Test Application that you created.
 * 5) On the Debug menu, click Start to run the application.

Form1 appears on the screen. However, all the controls that you put on the form are not displayed.

