Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8252275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T00:31:10+00:00 2026-06-08T00:31:10+00:00

My application displays a small banner loaded from the web in a TWebBrowser control.

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T00:31:12+00:00Added an answer on June 8, 2026 at 12:31 am

    In the OnBeforeNavigate2 event, check the requested URL and if it is one that you want to launch then Stop() the current navigation and call ShellExecute() to launch the URL in the user’s default external browser.

    procedure TForm1.WebBrowser1BeforeNavigate2(Sender: TObject; pDisp: IDispatch; var URL: Variant; var Flags: Variant; var TargetFrameName: Variant; var PostData: Variant; var Headers: Variant; var Cancel: WordBool);
    begin  
      if (URL should be launched) then
      begin
        Cancel := True;
        WebBrowser1.Stop;
        ShellExecute(0, nil, PChar(String(Url)), nil, nil, SW_SHOWNORMAL);
      end;
    end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My application displays Hebrew text which comes from a Web Service. When a sentence
My application built with Google App Engine has this page that displays search results
I have a small custom control which downloads & displays a contacts image. It
I have a webBrowser Control. HTML inside webBrowser control displays some small images (4kb
I have an application that displays the data from 3 xml files (auto generated
I have an application that displays pictures from the internet (showcase for designer work).
I have an web application that displays employee birthdays for the current month in
I have a small application that displays a listbox under the cursor position when
I've been writing a small desktop gadget-type application that displays scrolling text along the
I have a java web application that generates and displays graphical pictures based upon

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.