开发者

how to set vertical scroll bar in win form

开发者 https://www.devze.com 2022-12-19 09:38 出处:网络
I am very new to win form. I want to develop a form which has a height of around 992*1403. i tried to give the size of the win form as 992*1403, but its taking only 992*876.

I am very new to win form. I want to develop a form which has a height of around 992*1403. i tried to give the size of the win form as 992*1403, but its taking only 992*876. i am setting an image of size 992*1403 as the background. i need to put a vertical scroll bar. i put that scroll bar but i dnt know how to write the code when the user scrolls that scroll bar.

Please give me some sa开发者_如何转开发mple codes or links


For what you are describing, you just need to set the form's Autoscroll property to true. (It is under the "Layout" section). Right-click on the form and select "Properties"

This will add scroll bars if the form doesn't fit into the current window size. No code is required. The scroll bars will only appear when there is a control outside the current view.


Reading your description again, what you might be looking for is a large panel in your form. Add a Panel to your form and make set the location to 0,0 and the size to 992,1403. Then add your controls to the panel. Don't forget to set the form's Autoscroll as mentioned above.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号