问题描述
Win7 x64,Delphi Xe2 update2
Win7 x64, Delphi Xe2 update2
提示:
- 编译为x32的新项目在项目选项中应用了视觉(vcl)样式,默认情况下已选择一个
- 在表单上的button1和WebBrowser1
- 在该按钮中,我们编写WebBrowser1.Navigate('http://google.com');
- 我们开始,我们按下按钮-在浏览器中,我们看到一个网站google.com,所有ок
我们将其编译为x64,它会在ок中启动,通过按下按钮,我们会收到错误消息"zerro上的浮动分割".
We compile as x64, it is started ок, by button pressing we receive an error "float division on zerro".
问题:
- 完全是这样(错误)吗?并为此而奋斗吗? (在x64模式下)
- 如何将视觉样式应用于滚动WebBrowser1? (在x32模式下):(本机组件无法蒙皮,但AlphaControls蒙皮系统-可以正常工作,并且webbrowser滚动行的皮肤可以正常显示
- At all so (error)? And as with it to struggle? (in x64 mode)
- How to apply visual style to strips of scrolling WebBrowser1? (in x32 mode):( a native component could not skin, but AlphaControls Skin system - work ok, and webbrowser scrolling lines skinned normal
p.s. update3尚未放入
p.s. update3 yet did not put
p.s.s.英文不好:on
p.s.s. bad english: on
推荐答案
可以通过将TWebBrowser组件子类化并处理这些事件来完成
This can be done subclassing the TWebBrowser component and handling these events
OnDocumentComplete
OnNavigateComplete2
OnBeforeNavigate2
OnCommandStateChange
OnProgressChange
加上 WM_SIZE Windows消息.
plus the WM_SIZE windows message.
关键是使用 TScrollbar 组件和Twincontrol作为容器与原始的Web浏览器滚动条重叠.
The key is use the TScrollbar component and a Twincontrol as container to overlap the original webbrowser scrollbars.
我刚刚写了一篇文章,深入解释了如何实现该方法 Delphi Vcl Styles and TWebBrowser
I just wrote an article which explains in depth how this can be implemented Delphi Vcl Styles and TWebBrowser
这篇关于Delphi Xe2 VCL样式和Web浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!