Welcome to Dream.In.Code
Getting VB.NET Help is Easy!

Join 136,456 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 1,935 people online right now. Registration is fast and FREE... Join Now!




Using a proxy in a web browser

2 Pages V  1 2 >  
Reply to this topicStart new topic

Using a proxy in a web browser, please help......i have a presentation in the morning :(

richard356
3 Aug, 2008 - 06:08 PM
Post #1

New D.I.C Head
*

Joined: 3 Aug, 2008
Posts: 34


My Contributions
vb
 Public Class mainform

Private Sub webBrowser1_StatusTextChanged( _
ByVal sender As Object, ByVal e As EventArgs) _
Handles WebBrowser1.StatusTextChanged

TextBox5.Text = WebBrowser1.StatusText

End Sub
Private Sub webBrowser1_Navigated(ByVal sender As Object, _
ByVal e As WebBrowserNavigatedEventArgs) _
Handles WebBrowser1.Navigated

TextBox1.Text = WebBrowser1.Url.ToString()

End Sub

Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted

End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
WebBrowser1.Refresh()
End Sub
End Class


This post has been edited by richard356: 3 Aug, 2008 - 06:30 PM
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: Using A Proxy In A Web Browser
3 Aug, 2008 - 07:39 PM
Post #2

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 8,993



Thanked: 125 times
Dream Kudos: 8625
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
What is the problem you're having?
User is offlineProfile CardPM
+Quote Post

richard356
RE: Using A Proxy In A Web Browser
3 Aug, 2008 - 08:05 PM
Post #3

New D.I.C Head
*

Joined: 3 Aug, 2008
Posts: 34


My Contributions
QUOTE(PsychoCoder @ 3 Aug, 2008 - 08:39 PM) *

What is the problem you're having?


I have no idea of how to do. I would greatly appreciate you help. thanks.
User is offlineProfile CardPM
+Quote Post

gbertoli3
RE: Using A Proxy In A Web Browser
3 Aug, 2008 - 09:29 PM
Post #4

DIC at Heart + Code
Group Icon

Joined: 23 Jun, 2008
Posts: 1,046



Thanked: 17 times
Dream Kudos: 950
My Contributions
What exactly is your problem that you are having?
User is offlineProfile CardPM
+Quote Post

richard356
RE: Using A Proxy In A Web Browser
3 Aug, 2008 - 09:38 PM
Post #5

New D.I.C Head
*

Joined: 3 Aug, 2008
Posts: 34


My Contributions
Thanks for helping me and i ment to take that out. I just want to make the basic webbrowser control with a proxy.

User is offlineProfile CardPM
+Quote Post

gbertoli3
RE: Using A Proxy In A Web Browser
3 Aug, 2008 - 09:40 PM
Post #6

DIC at Heart + Code
Group Icon

Joined: 23 Jun, 2008
Posts: 1,046



Thanked: 17 times
Dream Kudos: 950
My Contributions
Ok so what exactly do you need my help with?
User is offlineProfile CardPM
+Quote Post

richard356
RE: Using A Proxy In A Web Browser
3 Aug, 2008 - 09:43 PM
Post #7

New D.I.C Head
*

Joined: 3 Aug, 2008
Posts: 34


My Contributions
i dont know how to make the webbrowser go through a proxy for example e.g. proxy 123.123.123.1234 and port:1234
User is offlineProfile CardPM
+Quote Post

gbertoli3
RE: Using A Proxy In A Web Browser
3 Aug, 2008 - 09:46 PM
Post #8

DIC at Heart + Code
Group Icon

Joined: 23 Jun, 2008
Posts: 1,046



Thanked: 17 times
Dream Kudos: 950
My Contributions
Tell me if this helps

CODE

            Int32 port = 1234;
            String server = "123.123.123.1234";
            System.Net.WebProxy proxy = new System.Net.WebProxy(server, port);

User is offlineProfile CardPM
+Quote Post

richard356
RE: Using A Proxy In A Web Browser
3 Aug, 2008 - 09:47 PM
Post #9

New D.I.C Head
*

Joined: 3 Aug, 2008
Posts: 34


My Contributions
QUOTE(gbertoli3 @ 3 Aug, 2008 - 10:46 PM) *

Tell me if this helps

CODE

            Int32 port = 1234;
            String server = "123.123.123.1234";
            System.Net.WebProxy proxy = new System.Net.WebProxy(server, port);



im new to all of this so could you tell me where to put it?
User is offlineProfile CardPM
+Quote Post

gbertoli3
RE: Using A Proxy In A Web Browser
3 Aug, 2008 - 09:49 PM
Post #10

DIC at Heart + Code
Group Icon

Joined: 23 Jun, 2008
Posts: 1,046



Thanked: 17 times
Dream Kudos: 950
My Contributions
I don't know if this will work but I modified it a little

Sorry but I just realized that I was posting in C#, when I should've posted in VB.NET
Here you Are
CODE

Private Sub webBrowser_Navigating(ByVal sender As Object, ByVal e As WebBrowserNavigatingEventArgs)
    Dim port As Int32 = 1234
    Dim server As String = "123.123.123.1234"
    Dim proxy As New System.Net.WebProxy(server, port)
    If proxy Is Nothing Then
        e.Cancel = True
    End If
End Sub

User is offlineProfile CardPM
+Quote Post

gbertoli3
RE: Using A Proxy In A Web Browser
3 Aug, 2008 - 09:56 PM
Post #11

DIC at Heart + Code
Group Icon

Joined: 23 Jun, 2008
Posts: 1,046



Thanked: 17 times
Dream Kudos: 950
My Contributions
So does it work?

To be honest I don't know much about proxies and I am not an expert in VB.NET I just know good amount
User is offlineProfile CardPM
+Quote Post

richard356
RE: Using A Proxy In A Web Browser
3 Aug, 2008 - 10:01 PM
Post #12

New D.I.C Head
*

Joined: 3 Aug, 2008
Posts: 34


My Contributions
QUOTE(gbertoli3 @ 3 Aug, 2008 - 10:56 PM) *

So does it work?

To be honest I don't know much about proxies and I am not an expert in VB.NET I just know good amount



It doesnt seem to be throwing me any errors so im guessing that it is working

thanks for helping a random in need
User is offlineProfile CardPM
+Quote Post

2 Pages V  1 2 >
Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 03:29PM

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month