[code] Change IP Address [code]

Status
Not open for further replies.

ReX

Senior
Original poster
senior
member
Joined
Apr 23, 2011
Posts
3,200
Reaction score
793
Points
113
Age
53
Looked useful to me :) not sure if it changes your real ip or not

Code:
Imports System
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
Shell("netsh interface ip set address name= " & Chr(34) & lstOutput.Text & Chr(34) & " dhcp")
Shell("netsh interface ip set dns name=" & Chr(34) & lstOutput.Text & Chr(34) & " dhcp")

End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim i As Integer
Dim ni As System.Net.NetworkInformation.NetworkInterface() = System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()
For Each Items As System.Net.NetworkInformation.NetworkInterface In ni

Me.lstOutput.Items.Add(Items.Name)
If i = 0 Then
lstOutput.Text = Items.Name
End If
i = i + 1
Next
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Shell("netsh interface ip set address name= " & Chr(34) & lstOutput.Text & Chr(34) & " static " & txtip.Text & " " & txtsub.Text & " " & txtgate.Text)
Shell("netsh interface ip set dns name=" & Chr(34) & lstOutput.Text & Chr(34) & " static " & txtdns.Text)

End Sub
End Class
 

vvvvv

Banned
Joined
Jul 2, 2011
Posts
205
Reaction score
18
Points
75
Location
Argentina
use AOL software and auto mouse, for change ip.
 
  • Like
Reactions: Ken
R

rob2k9

Guest
if you are really going to post some thing you didnt create or code please remember where you got it from and give credit to the creator / coder or place a link back to where you go it

you would want the same if it was something you created
 
Status
Not open for further replies.