Code.GeekInterview.com
 
Code Samples VB.NET
 

Find MAC Address


Code ResourceAuthor: sureshrndsoft  

Difficulty Level: Beginner

Published: 3rd Aug 2010   Read: 3661 times  

Filed in: VB.NET
Add Comment


 

 

Sponsored Links


 

 

Code to find MAC Address

 


Sample Code
  1. Dim objMOS As ManagementObjectSearcher
  2. Dim objMOC As Management.ManagementObjectCollection
  3. Dim objMO As Management.ManagementObject
  4. Try
  5.   objMOS = New ManagementObjectSearcher("Select * From    
  6.  Win32_NetworkAdapter")
  7.   objMOC = objMOS.Get
  8.  For Each objMO In objMOC
  9.      lblMAC.Text = (objMO("MACAddress"))
  10.   Next
  11.   objMOS.Dispose()
  12.   objMOS = Nothing
  13.   objMO.Dispose()
  14.   objMO = Nothing
  15. Catch ex As Exception
  16.   MsgBox(ex.Message)
  17. End Try
Copyright GeekInterview.com


Next Article: Creating Text files using VB.NET FileStreams.


 

Latest Code Samples

 

Popular Code Samples

 

Related Code Samples

 

Post Your Comment:

Members Please Login
Your Name:*
e-mail ID:(required for notification)*
Image Verification: 
 
 Subscribe    



Popular Coders

# Coder NameHits
1. Lokesh9477
2. jsubha20095844
3. supersubra5831
4. Lokesh M4627
5. sureshrndsoft3662
6. Biswabed Dash2394
7. alaa_eng1891

Active Coders

# Coder NameCodes
1. supersubra1
2. Biswabed Dash1
3. Lokesh1
4. Lokesh M1
5. jsubha20091
6. sureshrndsoft1
7. alaa_eng1

Refined Tags