Web browser beforenavigate2 |
Post Reply |
Author | |
PPL1
Groupie Joined: 10 April 2006 Location: Canada Status: Offline Points: 70 |
Post Options
Thanks(0)
Posted: 24 September 2008 at 4:39pm |
I have a WebBrowser control with some very simple html content (a few links). All links open up in a new window (target=_blank).
I want the link to open with the user's default browser, not IE. To do this, I need to trap the hyperlink click event, cancel it and do a shellexecute.
My problem is that beforenavigate2 event does not seem to be generated when the link target is _blank. This is expected since strickly speaking it isn't the control that is navigating, but a new browser window.
I tried the NewWindow2 event, but it does not have the clicked URL (an object is passed but it is set to nothing) ...
How can I trap the hyperlink click event when target=_blank ?
Thanks
|
|
PPL1
Groupie Joined: 10 April 2006 Location: Canada Status: Offline Points: 70 |
Post Options
Thanks(0)
|
Bump...
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi, So don't set target=_blank and catch BeforeNavigate event...
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
PPL1
Groupie Joined: 10 April 2006 Location: Canada Status: Offline Points: 70 |
Post Options
Thanks(0)
|
Yes this is sometimes a valid solution. However consider this case:
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Pierre , think you understand that our Webbrowser is just wrapper around standard control.
If Standard WebBrowser doesn't send BeforeNavigate for links with target=_blank we cant change it :( I sure WebBrowser from Microsoft ActiveX will work same.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |