Visual Basic Tutorial, VB6 Code Source, VB 2008, VB .NET, VB 2010, Visual Basic Source Code
Sponsor
Xhamster Video Player & Downloader vb2008 express edtion
Ringkasan ini tidak tersedia. Harap
klik di sini untuk melihat postingan.
HTTP Proxy Setting VB 2008
2 label
2 button
1 textbox dan 1 webbrowser
dan ini source codenya:
Imports System.Runtime.InteropServices
Public Class Form1
#Region "Using Proxy"
<Runtime.InteropServices.DllImport("wininet.dll", SetLastError:=True)> _
Private Shared Function InternetSetOption(ByVal hInternet As IntPtr, ByVal dwOption As Integer, ByVal lpBuffer As IntPtr, ByVal lpdwBufferLength As Integer) As Boolean
End Function
Public Structure Struct_INTERNET_PROXY_INFO
Public dwAccessType As Integer
Public proxy As IntPtr
Public proxyBypass As IntPtr
End Structure
Private Sub UseProxy(ByVal strProxy As String)
Const INTERNET_OPTION_PROXY As Integer = 38
Const INTERNET_OPEN_TYPE_PROXY As Integer = 3
Dim struct_IPI As Struct_INTERNET_PROXY_INFO
struct_IPI.dwAccessType = INTERNET_OPEN_TYPE_PROXY
struct_IPI.proxy = Marshal.StringToHGlobalAnsi(strProxy)
struct_IPI.proxyBypass = Marshal.StringToHGlobalAnsi("local")
Dim intptrStruct As IntPtr = Marshal.AllocCoTaskMem(Marshal.SizeOf(struct_IPI))
Marshal.StructureToPtr(struct_IPI, intptrStruct, True)
Dim iReturn As Boolean = InternetSetOption(IntPtr.Zero, INTERNET_OPTION_PROXY, intptrStruct, System.Runtime.InteropServices.Marshal.SizeOf(struct_IPI))
End Sub
#End Region
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
UseProxy(TextBox1.Text)
End Sub
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
Label2.Text = WebBrowser1.Document.All("content").InnerText
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
WebBrowser1.Navigate("http://ip-score.com")
End Sub
End Class
Dan ini aplikasinya
Download disini
Youtube auto viewer with proxy setting Vb 2008
Yang perlu dipersiapkan adalah:
4 label
2 textbox
1 shockwave plugin
1 timer interval 1000
1 listbox dan 3 button
ini source codenya:
untuk form 2 yang dipersiapkan adalah
1 label
1 timer dan 1 webbrowser
ini code untuk form 2 nya:
Link Download aplikasi:
Download disini
4 label
2 textbox
1 shockwave plugin
1 timer interval 1000
1 listbox dan 3 button
ini source codenya:
Imports System.Runtime.InteropServices
Imports System.IO
Imports System.Text
Public Class Form1
Dim op As New OpenFileDialog()
#Region "Using Proxy"
<Runtime.InteropServices.DllImport("wininet.dll", SetLastError:=True)> _
Private Shared Function InternetSetOption(ByVal hInternet As IntPtr, ByVal dwOption As Integer, ByVal lpBuffer As IntPtr, ByVal lpdwBufferLength As Integer) As Boolean
End Function
Public Structure Struct_INTERNET_PROXY_INFO
Public dwAccessType As Integer
Public proxy As IntPtr
Public proxyBypass As IntPtr
End Structure
Private Sub UseProxy(ByVal strProxy As String)
Const INTERNET_OPTION_PROXY As Integer = 38
Const INTERNET_OPEN_TYPE_PROXY As Integer = 3
Dim struct_IPI As Struct_INTERNET_PROXY_INFO
struct_IPI.dwAccessType = INTERNET_OPEN_TYPE_PROXY
struct_IPI.proxy = Marshal.StringToHGlobalAnsi(strProxy)
struct_IPI.proxyBypass = Marshal.StringToHGlobalAnsi("local")
Dim intptrStruct As IntPtr = Marshal.AllocCoTaskMem(Marshal.SizeOf(struct_IPI))
Marshal.StructureToPtr(struct_IPI, intptrStruct, True)
Dim iReturn As Boolean = InternetSetOption(IntPtr.Zero, INTERNET_OPTION_PROXY, intptrStruct, System.Runtime.InteropServices.Marshal.SizeOf(struct_IPI))
End Sub
#End Region
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
web.Navigate("http://www.youtube.com/embed/" + TextBox1.Text + "?autoplay=1")
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
web.Navigate("http://www.youtube.com/embed/MrUvwAZdWCw?autoplay=1")
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
op.Filter = "TXT FILES|*.txt"
If op.ShowDialog = Windows.Forms.DialogResult.OK Then
ListBox1.Items.AddRange(IO.File.ReadAllLines(op.FileName))
Label2.Text = 1
Timer1.Enabled = True
End If
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Label2.Text -= 1
If ListBox1.SelectedIndex > ListBox1.Items.Count Then
Timer1.Enabled = False
End If
If Label2.Text = 0 Then
ListBox1.SelectedIndex = ListBox1.SelectedIndex + 1
Label2.Text = 100
TextBox2.Text = ListBox1.Text
End If
End Sub
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
Dim s As String = ListBox1.Text
UseProxy(s)
If TextBox1.Text = "" Then
web.Navigate("http://www.youtube.com/embed/MrUvwAZdWCw?autoplay=1")
Else
web.Navigate("http://www.youtube.com/embed/" + TextBox1.Text + "?autoplay=1")
End If
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Form2.Show()
End Sub
End Class
untuk form 2 yang dipersiapkan adalah
1 label
1 timer dan 1 webbrowser
ini code untuk form 2 nya:
Public Class Form2
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Timer1.Enabled = True
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If Label1.Text = 0 Then
WebBrowser1.Navigate("cmyip.com")
End If
End Sub
End Class
Link Download aplikasi:
Download disini
Langganan:
Postingan (Atom)