bona_bone1
March 8th, 2009, 04:23 PM
Hello All,
trying to get all the:
IP address
Network card description
MAC address
operational status
speed
for every network card:
For Each nic As System.Net.NetworkInformation.NetworkInterface In System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()
TextBox1.Text = (String.Format("{0}", nic.Description))
Label6.Text = (String.Format("{0}", nic.GetPhysicalAddress))
Label10.Text = (String.Format("{0}", nic.OperationalStatus))
Label12.Text = (String.Format("{0}", nic.Speed))
Next
I currently have the above, but it only returns the last network card configuration. If i put "exit for" before next, it returns the first network card result but I would like to scroll through each card?
I know it is just putting the data in the same location, therefore overwriting the data in the labels. Could I pause the loop, and continue the loop through with a button click perhaps?
Any help would be greatly appreciated.
Thanks
Paul
trying to get all the:
IP address
Network card description
MAC address
operational status
speed
for every network card:
For Each nic As System.Net.NetworkInformation.NetworkInterface In System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()
TextBox1.Text = (String.Format("{0}", nic.Description))
Label6.Text = (String.Format("{0}", nic.GetPhysicalAddress))
Label10.Text = (String.Format("{0}", nic.OperationalStatus))
Label12.Text = (String.Format("{0}", nic.Speed))
Next
I currently have the above, but it only returns the last network card configuration. If i put "exit for" before next, it returns the first network card result but I would like to scroll through each card?
I know it is just putting the data in the same location, therefore overwriting the data in the labels. Could I pause the loop, and continue the loop through with a button click perhaps?
Any help would be greatly appreciated.
Thanks
Paul