TWebBrowser-尝试修复“无效的浮点操作"错误 [英] TWebBrowser - Trying to fix the "Invalid floating point operation" error

查看:114
本文介绍了TWebBrowser-尝试修复“无效的浮点操作"错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

TWebBrowser组件有错误,如下所述 [IE9]'浮动WebBrowser会发生零分".解决方案是调用一个过程,该过程将禁用所有除以零的异常.我正在尝试解决此问题,而不必调用此过程.

到目前为止,我最好的主意是禁用TWebBrowser滚动条,并尝试使用TScrollBar模拟相同的功能.到目前为止,它正在工作,但这是一个问题:

如何将TWebBrowser中的导航与TScrollBar同步?我需要拦截TWebBrowser的滚动消息并将其发送到TScrollBar,以使栏与正在显示的文档保持同步.有谁知道该怎么做?

更清楚:我需要一种方法来告诉TScrollBar相对于TWebBrowser中光标位置的位置.

我正在使用Delphi 2010.

解决方案

我认为不值得尝试. IE中的滚动将在其滚动条可见或不可见的情况下发生……使用TScrollbar显然将滚动浏览器,据推测,这反过来又会产生相同的确切错误.我不知道IE的内部知识,不知道此浮点错误到底在哪里...

是所有滚动条,还是只是外部滚动条?滚动的内部内容(例如嵌入式框架)如何处理?文档中的其他内部滚动条会产生相同的错误吗?如果他们这样做了,那么您将在相当长的一段时间内试图在所有可滚动内容上超越IE.

此修复程序已提供并经过测试.抱歉,但是我会使用建议的修复程序.

The TWebBrowser component has an error as described here [IE9] 'Floating point division by zero' occurs with WebBrowser. The solution is to call a procedure that will disable all division by zero exceptions. I am trying to fix this problem without having to call this procedure.

So far, the best idea I had was to disable TWebBrowser scroll bars and try to simulate the same functionality using a TScrollBar. So far, it is working but that is the question:

How can I synchronize the navigation in the TWebBrowser with TScrollBar? I need to intercept scroll messages of TWebBrowser and send them to TScrollBar in order to keep the bar synchronized with the document that is being show. Does anyone knows how to do that?

To be more clear: I need an way of telling TScrollBar what is its position relative to the position of the cursor in the TWebBrowser.

I am using Delphi 2010.

解决方案

I don't believe it is worthwhile to try. The scrolling in IE is going to happen with or without its scroll bars being visible ... using your TScrollbar is apparently going to scroll the browser which in turn is assumedly going to generate the same exact error. I don't know the internals of IE to know where exactly this floating point error surfaces...

Are you after all scroll bars, or just the outer one? What about internal content that is scrolled, such as an embedded frame? Do the other internal scroll bars on a document generate the same error? If they do, then you'll be chasing your tail for quite a while trying to out-do IE on all it's scrollable content.

The fix is provided, and tested. Sorry, but I'd use the suggested fix.

这篇关于TWebBrowser-尝试修复“无效的浮点操作"错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆