heres a class that does it, it can get other lists too such as shared list, printer list etc, i;ve attached the class, just add it to the project, and in your form load have something like thie....
Have a listbox on the form named lstTerminals
VB Code:
Dim SW As CNetworkEnum 'Decalre class
Set SW = New CNetworkEnum 'Set class to SW
Call SW.SetResourceType(0) 'Set resource type
Call SW.Reset
Dim ST As String
ST = Replace(SW.GetServerList, "\\", "") 'Replace the \\ in the computer names
'loop through the list of computer names and put the in the listbox
For i = 1 To Len(ST)
If Mid(ST, i, 1) = "," Then
lstTerminals.AddItem (Left(ST, i - 1))
ST = Right(ST, Len(ST) - i)
i = 1
End If
Next i
BTW i found this on pscode.com, theres probably more simpler versions, this was just the first I found
Ah sorry, I thought you were using VB6, that code is for VB6, possibly you can use the class in .NET but I really have no idea, try posting in the .NET or API forum as this question is API related and technically is not actually network programming