3
votes

Win7 x64, Delphi Xe2 update2

Prompt:

  1. The new project, compile as x32, are applied visual (vcl) styles in the project options, by default one is chosen
  2. On the form the button1 and WebBrowser1
  3. In the button we write WebBrowser1.Navigate ('http://google.com');
  4. We start, we press the button - in a browser we see a site google.com, all ок

We compile as x64, it is started ок, by button pressing we receive an error "float division on zerro".

Questions:

  1. At all so (error)? And as with it to struggle? (in x64 mode)
  2. 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 yet did not put

p.s.s. bad english: on

2
Bad English were so cool. Seriously, this would be more useful to others if you took a few minutes to clean up the grammar mistakes. I had to reread it several times and I'm still not sure I fully understand the question.Kenneth Cochran

2 Answers

6
votes

This can be done subclassing the TWebBrowser component and handling these events

OnDocumentComplete
OnNavigateComplete2
OnBeforeNavigate2
OnCommandStateChange
OnProgressChange

plus the WM_SIZE windows message.

The key is use the TScrollbar component and a Twincontrol as container to overlap the original webbrowser scrollbars.

I just wrote an article which explains in depth how this can be implemented Delphi Vcl Styles and TWebBrowser

0
votes

VCL styles cannot be applied to TWebBrowser AFAIK. Its UI is controlled by Internet Explorer, not the VCL.