Hello!
I really need your help, guys...
I am trying to create a bho that will navigate ie to my custom error page instead of the regular pages from ieframe.dll.
I tried using this code:
CODE
void Explorer_BeforeNavigate2(object pDisp, ref object URL, ref object Flags, ref object TargetFrameName, ref object PostData, ref object Headers, ref bool Cancel)
{
if (URL.ToString().Contains("res://ieframe.dll/"))
{
Cancel = true;
//Now navigate to your custom page
}
}
But with no luck.. the BeforeNavigate event doesn't seem to fire when ie navigates on it's own to the error pages.
I also tried using the event NavigateError, but that does not fire when there is a dnserror.
Could anyone please help me figure out how to do this?
A sample code would be great.
Thank you,
Dekel