Recent

Author Topic: Activexcontainer assigned comserver destroyed on BorderStyle change  (Read 4857 times)

vhanla

  • New Member
  • *
  • Posts: 13
Hello, I'm following http://wiki.lazarus.freepascal.org/LazActiveX TEvsWebBrowser demo snippet, and it works fine. I'm trying to turn it into a full screen application, so I change BorderStyle to bsNone and perform maximize messages (F11 hotkey, also using a menu), it works but TEvsWebBrowser disappears and it seems it is destroyed somehow. I also tried to create using a TPanel as parent, but it doesn't matter where I create the webbrowser, changing BorderStyle (to a different one) deletes it.

Hope you can help me. Regards! :)

vhanla

  • New Member
  • *
  • Posts: 13
Re: Activexcontainer assigned comserver destroyed on BorderStyle change
« Reply #1 on: September 24, 2018, 03:17:13 am »
Actually, the browser component is not destroyed, but it seems to be hidden from container and inaccessible, so in order to workaround I followed this steps to kinda keep it.

Before changing BorderStyle, first set ActiveXContainer.Active to False, then change BorderStyle, afterwards restore ActiveXContainer.Active to True, but it will be shown a blank content, so Navigate2 is called again (the page will be loaded again), which is not what is expected. But at least is better than having browser lost.

Hope someone shows the correct way to fix this issue.

 

TinyPortal © 2005-2018