1
我有WebBrowser
控制在我的Form
。和我允許JavaScript
,在C#形式調用一個方法:C#WebBrowser禁用和隱藏滾動條
[ComVisible(true)]
public class ScriptManager
{
// Variable to store the form of type Form1.
private Form1 mForm;
// Constructor.
public ScriptManager(Form1 form)
{
// Save the form so it can be referenced later.
mForm = form;
}
// This method can be called from JavaScript.
public void EnterFullScreenMode()
{
// Call a method on the form.
mForm.EnterFullScreenMode();
}
}
而在晶型I包括以下方法:
public void EnterFullScreenMode()
{
browser.ScrollBarsEnabled = false;
}
,我注意到,當我調用此方法以除去滾動條WebBrowser
頁面刷新並且滾動條仍在那裏。 任何想法是什麼問題?還有其他方法可以隱藏和禁用滾動條?
在這個問題上有[看](http://stackoverflow.com/questions/11678973/hide-scrollbars-in-the-the-webbrowser-control) – Andrea