Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enable scroll bars in windows forms

Tags:

c#

winforms

I'm developing a windows forms application. In my application I have anchored controls to forms such that forms can be maximized and controls will get arranged accordingly. This application should support different DPI values.

I have set the anchors of some controls to bottom, right, and bottom-right. The AutoScroll property of the forms is set to true. When the DPI value is on default (96) controls work as expected. But the problem is if the screen loads in higher DPI (like 120), even though form scroll bars enabled, controls which are anchored to bottom and bottom-right cannot be seen.

Could anybody please advise me on this issue?

regards, Eranga

like image 838
user1314391 Avatar asked Apr 05 '12 05:04

user1314391


People also ask

How do I enable scrollbar?

Click Start > Settings. Under Windows Settings, scroll down, and then click Ease of Access > Display. Scroll down, and then set Automatically hide scroll bars in Windows to Off.

How do I add a scroll in Winforms?

Just set the AutoScroll property of your Panel to true and it will handle adding the scrollbars for you. Bear in mind that your controls will need to be anchored to the Top of the Panel to cause Vertical scroll bars automatically, and the Left of the Panel to cause Horizontal scroll bars automatically.

How do I keep scroll bars visible?

Go to Settings / Ease of Access / Display and turn off Automatically hide scroll bars in Windows.

How do I show the scroll bar in Visual Studio?

Open the Scroll Bars options page by choosing Tools > Options > Text Editor > All Languages > Scroll Bars.


1 Answers

Set AutoScroll = True In Form Properties

Set AutoScroll = true on form

like image 192
Elshan Avatar answered Oct 01 '22 10:10

Elshan