User Ratings
Rate This Project
Login To Rate This Project
User Reviews
-
I can't figure how to GIT Public Class Form1 Public Function GetLocalIP() As String Dim _IP As String = Nothing ' Resolves a host name or IP address to an IPHostEntry instance. ' IPHostEntry - Provides a container class for Internet host address information. Dim _IPHostEntry As System.Net.IPHostEntry = System.Net.Dns.GetHostEntry(System.Net.Dns.GetHostName()) ' IPAddress class contains the address of a computer on an IP network. For Each _IPAddress As System.Net.IPAddress In _IPHostEntry.AddressList ' InterNetwork indicates that an IP version 4 address is expected ' when a Socket connects to an endpoint If _IPAddress.AddressFamily.ToString() = "InterNetwork" Then _IP = _IPAddress.ToString() End If Next _IPAddress Return _IP End Function Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click End Sub Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged End Sub Private Sub Label2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label2.Click End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click TextBox1.Text = GetLocalIP() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click TextBox2.Text = (Environment.MachineName) End Sub Private Sub Label3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged End Sub Private Sub Label3_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label3.Click End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click End End Sub End Class 'Compiled by andyroo54, with great input from OCAU members: Kreegor andPabloEscobar.