|
-
Sep 4th, 2003, 09:08 AM
#1
Thread Starter
Hyperactive Member
Internet Explorer
In Internet Explorer when someone types in a URL and clicks go or presses enter is there any way that I can intercept that action and differ internet explorer to another site of my choice.
The reason for this is one of our clients wants to have restrictions placed on internet explorer so they can't go to site other than the ones that are specified, without using the content advisor.
Or alternitively is there another program that you can think that would do the job.
Regards,
Matt.
-
Sep 4th, 2003, 10:41 AM
#2
you could add a combo box to your form ( which holds specific urls ) then you can launch internet explorer without a toolbar like this... ( depending whether you add a reference to internet controls, so i've done an example with and 1 without ) ...
VB Code:
[COLOR=BLUE]Private[/COLOR] [COLOR=BLUE]Sub[/COLOR] Button1_Click([COLOR=BLUE]ByVal[/COLOR] sender [COLOR=BLUE]As[/COLOR] System.Object, [COLOR=BLUE]ByVal[/COLOR] e [COLOR=BLUE]As[/COLOR] System.EventArgs) [COLOR=BLUE]Handles[/COLOR] Button1.Click
[COLOR=BLUE]Dim[/COLOR] objBrowser [COLOR=BLUE]As[/COLOR] [COLOR=BLUE]Object[/COLOR] = CreateObject("InternetExplorer.Application")
[COLOR=BLUE]Dim[/COLOR] IE [COLOR=BLUE]As[/COLOR] SHDocVw.InternetExplorer = [COLOR=BLUE]DirectCast[/COLOR](objBrowser, SHDocVw.InternetExplorer)
[COLOR=GREEN]'/// reference to Microsoft Internet Controls required this way.
[/COLOR] [COLOR=BLUE]With[/COLOR] IE
.ToolBar = [COLOR=BLUE]False[/COLOR] [COLOR=GREEN]'/// no toolbar, so the user cant specify urls.
[/COLOR] .Height = 500
.Width = 500
.Visible = [COLOR=BLUE]True
[/COLOR] .Navigate(ComboBox1.Text)
[COLOR=BLUE]End[/COLOR] [COLOR=BLUE]With
[/COLOR] [COLOR=BLUE]End[/COLOR] [COLOR=BLUE]Sub
[/COLOR] [COLOR=BLUE]Private[/COLOR] [COLOR=BLUE]Sub[/COLOR] Button2_Click([COLOR=BLUE]ByVal[/COLOR] sender [COLOR=BLUE]As[/COLOR] System.Object, [COLOR=BLUE]ByVal[/COLOR] e [COLOR=BLUE]As[/COLOR] System.EventArgs) [COLOR=BLUE]Handles[/COLOR] Button2.Click
[COLOR=BLUE]Dim[/COLOR] objBrowser [COLOR=BLUE]As[/COLOR] [COLOR=BLUE]Object[/COLOR] = CreateObject("InternetExplorer.Application")
[COLOR=GREEN]'/// without a reference to Microsoft Internet Controls, may cause a problem with Option Strict On.
[/COLOR] [COLOR=BLUE]With[/COLOR] objBrowser
.ToolBar = [COLOR=BLUE]False[/COLOR] [COLOR=GREEN]'/// no toolbar, so the user cant specify urls.
[/COLOR] .Height = 500
.Width = 500
.Visible = [COLOR=BLUE]True
[/COLOR] .Navigate(ComboBox1.Text)
[COLOR=BLUE]End[/COLOR] [COLOR=BLUE]With
[/COLOR] [COLOR=BLUE]End[/COLOR] [COLOR=BLUE]Sub[/COLOR]
~
if a post is resolved, please mark it as [Resolved]
protected string get_Signature(){return Censored;}
[vbcode][php] please use code tags when posting any code [/php][/vbcode]
-
Sep 4th, 2003, 02:08 PM
#3
Frenzied Member
Re: Internet Explorer
Originally posted by MattJH
The reason for this is one of our clients wants to have restrictions placed on internet explorer so they can't go to site other than the ones that are specified, without using the content advisor.
Why? Why? If i was there i would find lots of work arounds to bypass the restriction. Don't waste your time man.
'Heading for the automatic overload'
Marillion, Brave, The Great Escape, 1994
'How will WE stand the FIRE TOMORROW?'
Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979
-
Sep 4th, 2003, 03:07 PM
#4
Just use the host file.
All you do is write to it what sites you don't want the person to go to and where you want that url/ip to take the person too
-
Sep 5th, 2003, 03:57 AM
#5
Thread Starter
Hyperactive Member
Thanks
Thanks for your help.
I have used the PICS Rules, from within the content tab in internet options.
Regards,
Matt.
-
Sep 5th, 2003, 11:53 AM
#6
Re: Thanks
Originally posted by MattJH
Thanks for your help.
I have used the PICS Rules, from within the content tab in internet options.
Regards,
Matt.
You could of used the hosts file though.
It's in the system32 folder I think...
You can just write to it what sites you want to go where and boom they can't get to it through ANY browser. Your way will probably allow them to get through if they just download netscape, opera, firdbird, ect...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|