Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TWebBrowser without parent window

I am trying to use TWebBrowser in Console/Service type of application (without any windows). Navigate is definitely doing something, but it never calls onDocumentComplete. Is there any other way to get access to IHTMLDocument2 of some URL?

Thank you.

like image 293
Nipp Avatar asked Jan 27 '26 16:01

Nipp


1 Answers

Before using the TWebBrowser instance (e.g. with Navigate2), call its HandleNeeded method. This will allocate an 'invisible' parent window handle and straighten out any event issues.

like image 121
Stijn Sanders Avatar answered Jan 29 '26 09:01

Stijn Sanders



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!