Kod:
Imports System.Net
Imports System.Text.RegularExpressions
kütüphaneye ekliyoruz-
Kod:
Private Function GetIP() As String
Dim wc As New WebClient()
Dim strIP As String = wc.DownloadString("http://checkip.dyndns.org")
strIP = (New Regex("\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b")).Match(strIP).Value
wc.Dispose()
Return strIP
End Function
Kod:
Buton click olayına şu kodları girelim:
Kod:
Label1.Text = (GetIP())
