Welcome to Dream.In.Code
Getting C# Help is Easy!

Join 132,157 C# Programmers for FREE! Get instant access to thousands of C# experts, tutorials, code snippets, and more! There are 1,784 people online right now. Registration is fast and FREE... Join Now!




Creating a bho to replace IE error pages with a custom page

 
Reply to this topicStart new topic

Creating a bho to replace IE error pages with a custom page

dekelc
post 6 Oct, 2008 - 10:12 AM
Post #1


New D.I.C Head

*
Joined: 6 Oct, 2008
Posts: 1



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
User is offlineProfile CardPM

Go to the top of the page

PsychoCoder
post 6 Oct, 2008 - 05:34 PM
Post #2


using DIC.Core;

Group Icon
Joined: 26 Jul, 2007
Posts: 8,920



Thanked 117 times

Dream Kudos: 8475

Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions


Check out the NavigateError Event smile.gif
User is online!Profile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/21/08 02:01PM

Live C# Help!

C# Tutorials

Reference Sheets

C# Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month