2025-03-10, 19:31:22
(2025-03-09, 12:39:50)wila Wrote: Hi CYZ,
Use the event OnNewWindowsRequested to block the opening of a new window by setting Args.Handled to True.
Then use navigate to browse to the URL you needed to go.
The VB6 - New Window Handling example shows you in more details, but let me copy & paste the specific code I meant as it explains more than just one technique.
Code:Private Sub EdgeWebBrowser_OnNewWindowRequested(ByVal Args As AntViewAx2.IAntViewNewWindowRequestedEventArgs)
' ..
If OptionRadio(1).Value = True Then
Args.Handled = True
EdgeWebBrowser.Navigate Args.URI
End If
I just noticed you use VFP.
There is an example on how-to do this too for Fox Pro in the examples of AntView version 2.
edit: and now I see that the url is "#", so the same page. I guess that there's an onclick event attached to that url that handles whatever the link should do. It might enough to just block the click and not navigate. Not sure, we might be missing context.
--
Wil
Thanks, Wil. I will test it.
CYZ