WebSite Blocker

Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
12 posts Page 1 of 2
Contributors
User avatar
Martin
Supreme VIP
Supreme VIP
Posts: 369
Joined: Sat Aug 01, 2009 12:26 pm

WebSite Blocker
Martin
How to make an WebSite Blocker? :D
Image
User avatar
Insignia
VIP-Member
VIP-Member
Posts: 238
Joined: Thu Feb 11, 2010 5:15 pm

Re: WebSite Blocker
Insignia
How do you mean, Website blocker?
User avatar
Martin
Supreme VIP
Supreme VIP
Posts: 369
Joined: Sat Aug 01, 2009 12:26 pm

Re: WebSite Blocker
Martin
i dont want the webbrowser control to navigate to a some sites that are listed in a listbox control
Image
Lewis
Coding God
Coding God
Posts: 1564
Joined: Sun Dec 20, 2009 2:12 pm

Re: WebSite Blocker
Lewis
Hello this is not my code,
On form load put this code:

LoadBlockedSites()

The sub to load the blocked sites in a listbox:

Private Sub LoadBlockedSites()
ListBox1.Items.Clear()
Dim s As String
For Each s In My.Settings.BlockedSites
ListBox1.Items.Add(s)
Next

The code to Add a blocked site:

If txtBlock.Text = "" Then
'Do nothing
Else
My.Settings.BlockedSites.Add(AppManager.FixURL(txtBlock.Text))
LoadBlockedSites()
txtBlock.Text = String.Empty
End If

Also make a setting with the Name: BlockedSites
The type as: System.Collections.Specialized.StringCollection
Scope as: User
Value as:
<?xml version="1.0" encoding="utf-16"?>
<ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<string>www.codenstuff.com</string>
</ArrayOfString>

;o CodeNStuff blocked?
I think thats it if you get errors, you might, Then contact me :D

THIS CODE DOES NOT WORK :(
Image
User avatar
Nery
Co-Admin Moderator
Co-Admin Moderator
Posts: 1117
Joined: Mon Sep 07, 2009 8:11 pm

Re: WebSite Blocker
Nery
Just do something to check if the URL fits one of the sites in a ListBox, like if the URL contains www.codenstuff.com then it wont let you navigate to it by navigating to a kind of "error" web page made by you or other site.
User avatar
Martin
Supreme VIP
Supreme VIP
Posts: 369
Joined: Sat Aug 01, 2009 12:26 pm

Re: WebSite Blocker
Martin
lewisfroom wrote:
Hello this is not my code,
On form load put this code:

LoadBlockedSites()

The sub to load the blocked sites in a listbox:

Private Sub LoadBlockedSites()
ListBox1.Items.Clear()
Dim s As String
For Each s In My.Settings.BlockedSites
ListBox1.Items.Add(s)
Next

The code to Add a blocked site:

If txtBlock.Text = "" Then
'Do nothing
Else
My.Settings.BlockedSites.Add(AppManager.FixURL(txtBlock.Text))
LoadBlockedSites()
txtBlock.Text = String.Empty
End If

Also make a setting with the Name: BlockedSites
The type as: System.Collections.Specialized.StringCollection
Scope as: User
Value as:
<?xml version="1.0" encoding="utf-16"?>
<ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<string>www.codenstuff.com</string>
</ArrayOfString>

;o CodeNStuff blocked?
I think thats it if you get errors, you might, Then contact me :D

THIS CODE DOES NOT WORK :(
The Code Does Not Work :(
Image
User avatar
Livengood
Serious Programmer
Serious Programmer
Posts: 445
Joined: Tue Feb 16, 2010 6:24 am

Re: WebSite Blocker
Livengood
You could do somthing link
Code: Select all
If textbox1.text = "" then
webbrowser1.navigate("")
end if
you can edit this to make it were is will read the text in a listbox
Image
User avatar
35000vr
Top Poster
Top Poster
Posts: 176
Joined: Sat Mar 06, 2010 5:09 pm

Re: WebSite Blocker
35000vr
How about website un-blocker?
‼ <----- Copy it,it is together and if you backspace it it will both erase
☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !"<-----Some Cool symbols.
♂<-----Boy Symbol :)
²ƽ<--------Mini 2 and 5!
ð<----Not sure what it is.
☺☻<-----Smiles
♪♫<----Music Notes
Others:ß┬ƒ○║■ã¿┼↑
NoWayIn
VIP - Donator
VIP - Donator
Posts: 444
Joined: Sat Nov 21, 2009 11:16 pm

Re: WebSite Blocker
NoWayIn
Here's a example :

Let's say you want to block out all website except for CodenStuff's website
do the following :

If Textbox1.Text.contains("codenstuff") Then
WebBrowser1.Navigate(Textbox1.Text)
Else
Msgbox("Only CodenStuff Links Will Work")
End If
User avatar
Livengood
Serious Programmer
Serious Programmer
Posts: 445
Joined: Tue Feb 16, 2010 6:24 am

Re: WebSite Blocker
Livengood
hello Martin64 :),
i have been working on a project for this for you. i will post the files on heres as soon as i can, my father has my computer so i am not able to do this now.... :(
----------------------------------------------------------------------------------------------------------------------------------------
:) i added it
You do not have the required permissions to view the files attached to this post.
Image
12 posts Page 1 of 2
Return to “Tutorial Requests”