After my recent article regarding the Modern Web Browser control always appearing when placed on a tab control:

I decided to do a little more testing, as this was one thing I had never explored before, well not with the Modern Web Browser control at least.
Sadly, things went downhill!
What I have found is the Web Browser control just is flaky when placed on a Tab control. Sometimes it renders just fine, other times not. In the cases that it does not render, if you switch tab pages and then move back, then it renders properly.
How-To Reproduce This Bug
- Create a new form
- Insert a Tab control
- On page 2, insert a Text box (txt_URL) & below that a Modeern Web Browser control (mwb)
- Create a After Update event for the Text box such as:Me.mwb.Navigate Me.txt_URL
- Close and save everything
- Now play around with the text box by entering URLs. Sometimes it will work, other times not, other time it will display and then disappear.
The problem only occurs if the Modern Web Browser control is placed on a lower page and not the 1st page.
I can also assert that after some testing the Modern Web Browser control seem to perform faster on the 1st page when compared to it being placed on the 2nd, 3rd, … pages when loading the exact same URLs. More testing is required on this point, but it was noticeable to me with needing any advanced timing code.
Workaround
Once again the a Subform seems to come to the rescue here. By creating the Modern Web Browser control and text box in a form of their own and then inserting that form as a subform on the Tab control Page, the Modern Web Browser control seems to render properly in a consistent manner.