Imports System.Net.NetworkInformation
Public Class Form1
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Dim myComName As String = Environment.MachineName
Dim myMac As String = getMacAddress()
Label1.Text = myMac & "_" & myComName
End Sub
Function getMacAddress()
Dim nics() As NetworkInterface = _
NetworkInterface.GetAllNetworkInterfaces
Return nics(0).GetPhysicalAddress.ToString
End Function
End Class
vnote
Dim os() As String
Dim myuser() As String
Private Sub Form2_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
os = My.Computer.Info.OSFullName.Split(" ")
myuser = My.User.Name.Split("\")
Label1.Text = os(2)
Label2.Text = myuser(1)
End Sub
이 댓글을