FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to open link clicked in webview in default web browser?
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
How to open link clicked in webview in default web browser?
Posted: Thu Oct 30, 2025 10:19 AM

If there is a url clicked in a web page displayed with TWebView2, the linked is opened in Edge. Is there any way to make it so that it will open in user's default web browser?

Thank you

FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: How to open link clicked in webview in default web browser?
Posted: Fri Oct 31, 2025 04:47 AM
Dear Hua,

We have implemented it for you :)

Do you need it for 32 or 64 bits ?

What C compiler ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: How to open link clicked in webview in default web browser?
Posted: Fri Oct 31, 2025 07:16 AM

Thanks Antonio!

I am using BCC77 32-bits

FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: How to open link clicked in webview in default web browser?
Posted: Fri Oct 31, 2025 10:11 AM

Dear Hua,

Modified libs sent to you by email. Please test it and let me know how it works for you

many thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: How to open link clicked in webview in default web browser?
Posted: Fri Oct 31, 2025 11:35 AM

Hello Antonio,

I'm having the exact opposite problem as Mr. Hua. When I click a link on a page opened with TWebView2, it opens in a new window in the default browser. How can I get it to open in TWebView2?

Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: How to open link clicked in webview in default web browser?
Posted: Fri Oct 31, 2025 12:42 PM

Dear Hakan,

That is exactly what we have implemented.

Are you using 32 or 64 bits ? What C compiler ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: How to open link clicked in webview in default web browser?
Posted: Fri Oct 31, 2025 12:46 PM

32 bit. Harbour. MSVC 2022

Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: How to open link clicked in webview in default web browser?
Posted: Sat Nov 01, 2025 05:25 AM

Sent to your email

Please let me know if it works as expected

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: How to open link clicked in webview in default web browser?
Posted: Sat Nov 01, 2025 09:05 AM
Antonio Linares wrote: Sent to your email

Please let me know if it works as expected
Thank you Antonio,

I'll try it and get back to you right away.
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: How to open link clicked in webview in default web browser?
Posted: Mon Nov 03, 2025 02:22 AM
Thanks Antonio!
Received your email but the links have expired. Could you resend?
I only managed to check the email after coming into work today

Antonio Linares wrote: Dear Hua,

Modified libs sent to you by email. Please test it and let me know how it works for you

many thanks
FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: How to open link clicked in webview in default web browser?
Posted: Mon Nov 03, 2025 05:12 AM

Already sent

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: How to open link clicked in webview in default web browser?
Posted: Mon Nov 03, 2025 07:22 AM
Thanks Antonio.

I got this error message
Error: Unresolved external '_hb_retclen_buffer' referenced from FIVEHC.LIB|string
FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: How to open link clicked in webview in default web browser?
Posted: Mon Nov 03, 2025 11:18 AM
Fixed, news libs sent to you :)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: How to open link clicked in webview in default web browser?
Posted: Fri Nov 07, 2025 05:17 PM
Antonio Linares wrote:

Sent to your email

Please let me know if it works as expected

I have tested and it does not worked for me.

Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: How to open link clicked in webview in default web browser?
Posted: Fri Nov 07, 2025 05:46 PM

Dear Hakan,

Are you using Class TWebView2 ?

Here it is working fine

regards, saludos

Antonio Linares
www.fivetechsoft.com