How to hide a scroll bar when using webbrowser in WinCE

Source: Internet
Author: User

Method 1: using a program (http://blog.csdn.net/feihu521a/article/details/6166123,
Http://www.cnblogs.com/jinhui/archive/2010/11/08/1871676.html)
1. You need to derive the idochostuihandler and then reload its method. You need to implement gethostinfo and add code in it.
2. Add iid_idochostuihandler processing in the QueryInterface method of iunknown overload.

Method 2: HTML (http://topic.csdn.net/u/20080803/14/fc7d8221-bbea-4538-915e-375c2c07f10c.html)
The implementation method is very simple. Add a webbrowser component in the form and execute the following code:
Webbrowser1.navigate ('d: \ soft \ homepage.html ');
However, a problem arises: The webbrowser component has no borders before loading html. After loading HTML, a three-dimensional border appears around webbrowser, and the style of the program itself is extremely uncoordinated,

View all the attributes of webbrowser. You can change this setting without any attributes.
After testing, we found that this border is not produced by webbrowser, but by HTML loaded in webbrowser. If so, the problem will be solved. We can actually remove the border with CSS:

Body {border: 0px; overflow: auto;/* the scroll bar can be automatically hidden or displayed; set it to hidden to completely hide the scroll bar */}
When you are happy to set the above CSS, you find that the webbrowser border still exists. Is it CSS wrong? No, your doctype has a problem. The above CSS is ineffective in XHTML.

Set it to html4:
<! Doctype HTML public "-// W3C // dtd html 4.01 transitional // en">

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.