1 Network ထဲမွာ ရိွတဲ့ Computer နာမည္ေတြကို VB.NET ႏွင့္ ရယူၾကည့္ၿခင္း [Programming] 10th October 2009, 2:10 pm
sHa92
Founder
က်ေနာ္ အခုေရးေပးမယ့္ Code ေတြကေတာ့ Network ထဲမွာရိွေနမယ့္ Computer နာမည္ေတြကို List လုပ္ၿပီး ထုတ္ေပးမယ့္ Code ပါ။
Console Application အတြက္ေရးထားတာၿဖစ္ပါတယ္။ နားလည္ၾကမွာပါ...
Console Application အတြက္ေရးထားတာၿဖစ္ပါတယ္။ နားလည္ၾကမွာပါ...
- Code:
Sub Main()
Dim root As New DirectoryEntry("WinNT:")
Dim parent As DirectoryServices.DirectoryEntries
parent = root.Children
Dim d As DirectoryEntries = parent
For Each complist As DirectoryEntry In parent
For Each c As DirectoryEntry In complist.Children
If (c.Name <> "Schema") Then
Console.WriteLine(c.Name)
End If
Next
Next
End Sub