Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 2nd, 2007, 04:25 AM
Authorized User
 
Join Date: Jan 2007
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Oh ya,
and it is not windows application that having web browsing ability like putting web control over the application.

But an application that can listen to web browser event and control over the web browser behavior. something like hook on web browser, as we have a global hook over mouse and keyboard.

_____________________
(^oo^) as pure as snow
 
Old February 2nd, 2007, 05:56 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts
Default

I would load a list of banned sites into a collecion on the app, preferably from an encrypted file, and then test every navigation, if it is on the list, redirect.
There shouldn't be any problem using a local file.

I think the code is something like, yourBrowserName.Navigate(string URL);

But I think you should ask a more specific question, what part of this are you having trouble with.

======================================
They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad.
======================================
 
Old February 2nd, 2007, 06:26 AM
Authorized User
 
Join Date: Jan 2007
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

So sorry again that i forgot i have move forward and somehow solve this redirect issue part. Coz this whole things come together.

Ya, i have found out that the redirect path can be done using code something like this:

private WebBrowserClass Explorer = new WebBrowserClass();

Explorer.Navigate(m_Url, ref m_Flag, ref m_Frame, ref m_Postdata, ref m_Headers);

Of course for the web browser event, we have to register like:

Explorer.NavigateComplete2 += new SHDocVw.DWebBrowserEvents2_NavigateComplete2EventH andler(NavigateComplete2);

Now the problem is how to hook this eventhandler with IE window, so that when an event on IE window will be captured and handled by the application.

After research i found 2 ways on doing this:
1st: using BandObjectLib (tried but not working)
2nd: using BHO {Browser Helper Object} (got sample code in C++, don't know how to convert it into C#)

Hope not confusing you all

_____________________
(^oo^) as pure as snow





Similar Threads
Thread Thread Starter Forum Replies Last Post
URL Redirect based on given URL somnath.kartic VS.NET 2002/2003 1 August 2nd, 2012 08:21 AM
How to change file path to http url cJeffreywang BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 0 July 25th, 2007 12:18 AM
Error: File path and URL http map differently cJeffreywang ASP.NET 1.0 and 1.1 Basics 4 March 27th, 2007 08:03 PM
file path does not correspond to url rnelson330 .NET Framework 1.x 1 May 27th, 2006 09:42 AM
URL Redirect Help david29118 Classic ASP Basics 3 April 3rd, 2005 06:09 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.