Link to home
Start Free TrialLog in
Avatar of shala
shala

asked on

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?
Avatar of shala
shala

ASKER

Edited text of question.
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!
ASKER CERTIFIED SOLUTION
Avatar of mcrider
mcrider

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Keep your web page short enough so it fits on one screen and the scroll bar will go away...

M
mark2150,

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

Cheers!
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
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!
Avatar of shala

ASKER

That is a good idea! Thanks.