Use Browser control.

I put a WebBrowser control into a form,when I run the program,the control always appears a verticality scroll bar on the right,anyone knows how to remove the scrol bar?
shalaAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
mcriderConnect With a Mentor Commented:
Oh, by the way, if you have control of the HTML source, you can put "scroll=no" in the body tag and the scrollbars will not be shown...

For example:
     <HTML><TITLE>MyPage</TITLE>
     <BODY scroll=no>
     </HTML>

Cheers!
0
 
shalaAuthor Commented:
Edited text of question.
0
 
mcriderCommented:
I have never gotten the ShowScrollBar API to turn off a WebBrowser scrollbar, so I take the "lazy" way out...

I put the WebBrowser control in a PictureBox, then I size the PictureBox smaller than the WebBrowser window... Just small enough so that the scrollbars are "clipped off" by the picturebox...

I know... It's kinda lame, but it does work...

Cheers!
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
mark2150Commented:
Keep your web page short enough so it fits on one screen and the scroll bar will go away...

M
0
 
mcriderCommented:
mark2150,

That will not work if shala doesn't have control over what html is loaded...

Cheers!
0
 
mark2150Commented:
True, but what is point of blocking scroll bar? You're effectively saying that you don't want the user to see the rest of a page. Since they can't see it, what is point of putting out HTML that they can't scroll down and see?

If you're going to let them *visit* a page, then they should be able to *see* the page.

M
0
 
mcriderCommented:
Well, it depends on what shala is using the control for...  For example, I've used in the past for animation by using animated GIFs, as well as an app that had hotlinks on the page and I didn't want the user to scroll, just click the link and have the WebBrowser control jump to a # reference on the same page...

Cheers!
0
 
shalaAuthor Commented:
That is a good idea! Thanks.
0
All Courses

From novice to tech pro — start learning today.