03-24-2004 03:10 AM
03-24-2004 06:40 PM
06-23-2016 03:31 PM
in Dotnet is
Imports System.Management
Imports System.Management.ManagementClass
Imports System.Management.ManagementBaseObject
Imports System.Management.ManagementObjectCollection
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim mc As System.Management.ManagementClass
Dim mo As ManagementObject
mc = New ManagementClass("Win32_NetworkAdapterConfiguration")
Dim moc As ManagementObjectCollection = mc.GetInstances()
For Each mo In moc
If mo.Item("IPEnabled") = True Then
ListBox1.Items.Add("Endereço Físico : " & mo.Item("MacAddress").ToString())
End If
Next
End Sub
Notes: Listbox1 is better than textbox for create itens; GL .