My application displays a small banner loaded from the web in a TWebBrowser control. This banner is actually a HTML page including an image; when the users click the image it takes them to the promotional campaign we’re currently running.
The bad thing here is that when clicking the link in TWebBrowser, the campaign page is opened in Internet Explorer, not in their default browser. I know this happens because TWebBrowser is a IE-based control, but is there a way to open the link in users’ browser of choice?
Thank you.
In the
OnBeforeNavigate2event, check the requested URL and if it is one that you want to launch thenStop()the current navigation and callShellExecute()to launch the URL in the user’s default external browser.