Advertisement
Guest User

Untitled

a guest
Jan 25th, 2014
489
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 1.35 KB | None | 0 0
  1. Imports Skybound.Gecko
  2. Imports System.Net
  3.  
  4. Public Class Form1
  5.  
  6.     Public Sub New()
  7.  
  8.         ' Llamada necesaria para el diseñador.
  9.         InitializeComponent()
  10.  
  11.         ' Agregue cualquier inicialización después de la llamada a InitializeComponent().
  12.         Xpcom.Initialize(".\xulrunner\")
  13.         GeckoWebBrowser1 = New GeckoWebBrowser()
  14.         GeckoWebBrowser1.CreateControl()
  15.  
  16.     End Sub
  17.  
  18.     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  19.         If Not TextBox1.Text.Equals(String.Empty) And Not TextBox2.Text.Equals(String.Empty) Then
  20.             Dim newProxy As Uri = New Uri("http://" & TextBox1.Text & "/")
  21.             GeckoPreferences.Default("network.proxy.type") = 1
  22.             GeckoPreferences.Default("network.proxy.http") = newProxy.Host
  23.             GeckoPreferences.Default("network.proxy.http_port") = newProxy.Port
  24.             'GeckoPreferences.Default("network.proxy.ssl") = proxyAddress.Host
  25.             'GeckoPreferences.Default("network.proxy.ssl_port") = proxyAddress.Port
  26.             GeckoWebBrowser1.Navigate(TextBox2.Text)
  27.         End If
  28.     End Sub
  29.  
  30.     Private Sub TextBox2_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
  31.  
  32.     End Sub
  33.  
  34.     Private Sub Label1_Click(sender As Object, e As EventArgs) Handles Label1.Click
  35.  
  36.     End Sub
  37.  
  38. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement