Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
TextBox1.Text = AxWinsock1.LocalIP ----->show ip
TextBox2.Text = AxWinsock1.LocalHostName ----->show computername
End Sub
Public Shared Function ResolveDNS(ByVal Host As String) As String
Dim Entry As Net.IPHostEntry = Net.Dns.GetHostEntry(Host)
Dim Address As Net.IPAddress() = Entry.AddressList
Return Address.GetValue(0).ToString()
End Function
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Label4.Text = ResolveDNS(TextBox3.Text)-------->resolve domainname to ip
End Sub
End Class
หรือว่า ถ้าอยากจะ reverse resolve ip to domainname ต้องปรับ code ยังไงบ้าง
รบกวนด้วยนะค่ะ
ขอบคุณมากค่ะ