Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
nn mais vpn c'est un peu le même principeQuelqu'un ?J'en ai vraiment besoin c'est pour un grand projet quelqu'un sait faire en VB.net ?
Merci énormément !
et c'est 2 fois plus facile de faire vpn qu'un changeur d'ipQuelqu'un ?J'en ai vraiment besoin c'est pour un grand projet quelqu'un sait faire en VB.net ?
Merci énormément !
Tu serais comment faire ?et c'est 2 fois plus facile de faire vpn qu'un changeur d'ip
Tu veut le principe ou le code ?Tu serais comment faire ?
J'en ai vraiment besoin ! Parce que un pote à moi en veut un et je voulais lui faire de moi même ! Merci![]()
Il me faudrait les 2 !Tu veut le principe ou le code ?
Si tu me trouves pas skype passe en privé ton skype que je t'ajoute !Tu veut le principe ou le code ?
Tu voie t'en rappelle maintenantSi tu me trouves pas skype passe en privé ton skype que je t'ajoute !![]()
Imports System.Management
Imports System.Net
Imports System.Net.NetworkInformation
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim IPAddress As String = (TextBox1.Text)
Dim SubnetMask As String = (TextBox2.Text)
Dim Gateway As String = (TextBox3.Text)
Dim objMC As ManagementClass = New ManagementClass("Win32_NetworkAdapterConfiguration")
Dim objMOC As ManagementObjectCollection = objMC.GetInstances()
For Each objMO As ManagementObject In objMOC
If (Not CBool(objMO("IPEnabled"))) Then
Continue For
End If
Try
Dim objNewIP As ManagementBaseObject = Nothing
Dim objSetIP As ManagementBaseObject = Nothing
Dim objNewGate As ManagementBaseObject = Nothing
objNewIP = objMO.GetMethodParameters("EnableStatic")
objNewGate = objMO.GetMethodParameters("SetGateways")
'Set DefaultGateway
objNewGate("DefaultIPGateway") = New String() {Gateway}
objNewGate("GatewayCostMetric") = New Integer() {1}
'Set IPAddress and Subnet Mask
objNewIP("IPAddress") = New String() {IPAddress}
objNewIP("SubnetMask") = New String() {SubnetMask}
objSetIP = objMO.InvokeMethod("EnableStatic", objNewIP, Nothing)
objSetIP = objMO.InvokeMethod("SetGateways", objNewGate, Nothing)
Console.WriteLine("Updated IPAddress, SubnetMask and Default Gateway!")
Catch ex As Exception
MessageBox.Show("Unable to Set IP : " & ex.Message)
End Try
Next objMO
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
getip()
Catch ex As Exception
ex.ToString()
End Try
Dim PrimaryNic As New Collection
Dim PNic As String = ""
For Each networkCard As NetworkInterface In NetworkInterface.GetAllNetworkInterfaces
For Each gatewayAddr As GatewayIPAddressInformation In networkCard.GetIPProperties.GatewayAddresses
If gatewayAddr.Address.ToString <> "0.0.0.0" And networkCard.OperationalStatus.ToString() = "Up" Then
Dim IpAddress As UnicastIPAddressInformation
For Each IpAddress In networkCard.GetIPProperties.UnicastAddresses
TextBox2.Text = (IpAddress.IPv4Mask.ToString)
Next
' Get IP gateway information
TextBox3.Text = (gatewayAddr.Address.ToString)
End If
Next
Next
End Sub
Private Sub getip()
Dim hostname As String = Dns.GetHostName
Dim ip As String = System.Net.Dns.GetHostByName(hostname).AddressList(0).ToString
TextBox1.Text = ip
End Sub
End Class