How to open link clicked in webview in default web browser?

hua
Posts: 1109
Joined: Fri Oct 28, 2005 2:27 am

How to open link clicked in webview in default web browser?

Post by hua »

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
User avatar
Antonio Linares
Site Admin
Posts: 44515
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: How to open link clicked in webview in default web browser?

Post by Antonio Linares »

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
hua
Posts: 1109
Joined: Fri Oct 28, 2005 2:27 am

Re: How to open link clicked in webview in default web browser?

Post by hua »

Thanks Antonio!
I am using BCC77 32-bits
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
User avatar
Antonio Linares
Site Admin
Posts: 44515
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: How to open link clicked in webview in default web browser?

Post by Antonio Linares »

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
Horizon
Posts: 1388
Joined: Fri May 23, 2008 1:33 pm

Re: How to open link clicked in webview in default web browser?

Post by Horizon »

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
User avatar
Antonio Linares
Site Admin
Posts: 44515
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: How to open link clicked in webview in default web browser?

Post by Antonio Linares »

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
Horizon
Posts: 1388
Joined: Fri May 23, 2008 1:33 pm

Re: How to open link clicked in webview in default web browser?

Post by Horizon »

32 bit. Harbour. MSVC 2022
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.06
User avatar
Antonio Linares
Site Admin
Posts: 44515
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: How to open link clicked in webview in default web browser?

Post by Antonio Linares »

Sent to your email

Please let me know if it works as expected
regards, saludos

Antonio Linares
www.fivetechsoft.com
Horizon
Posts: 1388
Joined: Fri May 23, 2008 1:33 pm

Re: How to open link clicked in webview in default web browser?

Post by Horizon »

Antonio Linares wrote: Sat Nov 01, 2025 5:25 am 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
hua
Posts: 1109
Joined: Fri Oct 28, 2005 2:27 am

Re: How to open link clicked in webview in default web browser?

Post by hua »

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: 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
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
User avatar
Antonio Linares
Site Admin
Posts: 44515
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: How to open link clicked in webview in default web browser?

Post by Antonio Linares »

Already sent
regards, saludos

Antonio Linares
www.fivetechsoft.com
hua
Posts: 1109
Joined: Fri Oct 28, 2005 2:27 am

Re: How to open link clicked in webview in default web browser?

Post by hua »

Thanks Antonio.

I got this error message

Code: Select all | Expand

Error: Unresolved external '_hb_retclen_buffer' referenced from FIVEHC.LIB|string
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
User avatar
Antonio Linares
Site Admin
Posts: 44515
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: How to open link clicked in webview in default web browser?

Post by Antonio Linares »

Fixed, news libs sent to you :)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Horizon
Posts: 1388
Joined: Fri May 23, 2008 1:33 pm

Re: How to open link clicked in webview in default web browser?

Post by Horizon »

Antonio Linares wrote: Sat Nov 01, 2025 5:25 am

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
User avatar
Antonio Linares
Site Admin
Posts: 44515
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: How to open link clicked in webview in default web browser?

Post by Antonio Linares »

Dear Hakan,

Are you using Class TWebView2 ?

Here it is working fine

regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply