C# .NET - Scroll Bar in panel using windows application!!!!!!!!!!

Asked By vish on 02-Jul-12 01:14 AM
Hi,

I have taken one spilt container. In that there is two panel. In the second panel i have inserted the form.
Now the problem is when i scroll the form, the scroll doesnot goes fully down so the problem happens that the content which is at the bottom is not able to see...

So is there any solution which i can scroll the form properly....

Pls Help!!!!!!!!!!!!!!!!

Thanks in advance..........................
Jitendra Faye replied to vish on 02-Jul-12 01:29 AM
For this set AutoScroll = True for Panel Control.
TSN ... replied to vish on 02-Jul-12 01:37 AM

hi,,,

you can add the scroll bars to the panel using the Code.

below is the are steps..

ScrollBar vScrollBar1 = new VScrollBar();
vScrollBar1.Dock = DockStyle.Right;
vScrollBar1.Scroll += (sender, e) => { panel1.VerticalScroll.Value = vScrollBar1.Value; };
panel1.Controls.Add(vScrollBar1);

you can refe the page :
http://social.msdn.microsoft.com/Forums/en-IE/winforms/thread/6b9c2c72-e91a-40f0-a835-c12328490c0c

vish replied to TSN ... on 02-Jul-12 02:16 AM
But where to write this code??????