OLE Control window handle error with WebBrowser and Delphi 2007 -


i have run issue couple of weeks ago appear have no logical explanation. i'm building application delphi 2007 using alphacontrols , webbrowser component placed on form. twebbrowser fetches banner web , displays ui. bad thing form banner displayed, "could not obtain ole control window handle", while browser being displayed outside of form, in top left corner of desktop.

i've been trying figure out, debugger not provide information what's going on (that's get: first chance exception @ $770c4b32. exception class eoleerror message 'could not obtain ole control window handle'. process project1.exe (3700)). funny thing same twebbrowser on form1 of new project works without issues.

any thoughts on highly appreciated.

it caused html form being closed. vendor's forums show code fix problem. http://www.bsalsa.com/forum/showthread.php?t=255

set cancel true in onwindowclosing event , navigate empty page if main webbrowser. in case webbrowser popup window, may want close form ewb on.

procedure tform2.embeddedwb1windowclosing(asender: tobject; ischildwindow: wordbool; var cancel: wordbool); begin   cancel := true;   (asender tembeddedwb).goaboutblank; end; 

Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -