By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,157 Members | 891 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,157 IT Pros & Developers. It's quick & easy.

How to scroll the controls in vb.net web form?

Ajay Bhalala
100+
P: 119
I am creating the college management system in vb.net.

I have created the form named "MainPage" as home page.

And I have put 1 backgorund image in the form. and then I put 1
menustrip below the background.

I want to put some controls below the menustrip, but now there is no space available in the form.

I have tried to resize the form, but now the form can not become more big. What can I do?

In ASP.NET, there is facility available that automatically scroll-bar is available, but there is no such type of facility in vb.net.

You have any suggestion for this? Please help me.

Thank you in advance.
Jan 16 '15 #1

✓ answered by Frinavale

I haven't developed a win forms application in Many years....

Check out the ScrollBar Properties to determine which ones you want to use that will set the position of the control.

For example, the ScrollBar's Left property gets or sets the distance, in pixels, between the left edge of the control and the left edge of its container's client area.

Share this Question
Share on Google+
5 Replies


Frinavale
Expert Mod 5K+
P: 9,731
There are 2 major aspects to developing an ASP.NET application:
  1. Server Side: this is the VB.NET code executed on the server that produces output to display in browsers
  2. Client Side: this is HTML, CSS and JavaScript/Ajax code that is executed in the web browser to display things to the user

If you are implementing an ASP.NET web forms application there are a bunch of built in controls available to you.

For example, you have Panels, Labels, DropDownLists in ASP.NET; however, in HTML these things don't exist.

A Panel will be translated into an HTML <div> tag, a Label will be translated into an HTML <span> tag, a DropDowList will be translated into an HTML <select> tag with the items being HTML <option> tags.

With that in mind, you are looking for client-side/browser functionality to allow the content to be scrollable.

To do that you use an HTML style that you can apply to <div> elements (well, actaully you can apply this style to any element that is being displayed as a block)... Anyways, this style is called overflow.

You can apply styles to ASP.NET elements like this:
Expand|Select|Wrap|Line Numbers
  1. <asp:Panel ID="ScrollableContent" style="overflow:scroll; height:200px;" runat="server" >
  2. ....
  3. </asp:Panel>
-Frinny
Jan 19 '15 #2

Frinavale
Expert Mod 5K+
P: 9,731
Sorry I misread your question.

Try using the ScrollBar Control.

-Frinny
Jan 20 '15 #3

Ajay Bhalala
100+
P: 119
Ok, I have to use the ScrollBar Control.

But I have a big question...
"At the design time, how can I put my controls at their proper place?"

Thank you for your help.
Jan 21 '15 #4

Frinavale
Expert Mod 5K+
P: 9,731
I haven't developed a win forms application in Many years....

Check out the ScrollBar Properties to determine which ones you want to use that will set the position of the control.

For example, the ScrollBar's Left property gets or sets the distance, in pixels, between the left edge of the control and the left edge of its container's client area.
Jan 21 '15 #5

Ajay Bhalala
100+
P: 119
OK Frinny,

I have tried it. But at design time, I can't scroll, but at run time, it works. I can not get the idea of my form's design, so I have add and put my controls at runtime, so its works.

Thank You so much for your suggestion.

Thank you very very very much for all the helps from you.

Thank you.
Jan 24 '15 #6

Post your reply

Sign in to post your reply or Sign up for a free account.