西京医院王新教授:WebBrowser滚动条同时滚动再遇难题

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/02 16:19:23
我用以下代码已经可以做到单框架网页同时滚动,但只要网页中出现框架就不行了,请高手帮我解决这个问题。希望能准确详细点!!!!

var Doc: IHTMLDocument2;e: IHTMLElement2; b: IHTMLElement; position: Extended;
Doc := (webbrowser1.Document) as IHtmldocument2;
b := doc.Get_body;
b.QueryInterface(IHTMLElement2, e);
position := e.get_scrollTop;
Doc := WebBrowser2.Document as IHTMLDocument2;
b := doc.Get_body;
b.QueryInterface(IHTMLElement2, e);
e.Set_scrollTop(Trunc(position));

没人会啊?????????