This works for me:
<WebBrowser LoadCompleted="wb_LoadCompleted"></WebBrowser>
void wb_LoadCompleted(object sender, NavigationEventArgs e)
{
string script = "document.body.style.overflow ='hidden'";
WebBrowser wb = (WebBrowser)sender;
wb.InvokeScript("execScript", new Object[] { script, "JavaScript" });
}
This way you don't need mshtml
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…