You can do something like this, though I have not tested this code, but you get the idea:
Private Function IsMemberOfDomain(ByVal ComputerName As String) As Boolean
Dim entry As DirectoryEntry = New DirectoryEntry("LDAP://yourdomain")
Dim DirSearcher As DirectorySearcher = New DirectorySearcher(entry)
DirSearcher.Filter = "(objectClass=computer)"
For Each result As SearchResult In DirSearcher.FindAll
If result.GetDirectoryEntry.Name.ToString = ComputerName Then
Return True
End If
Next
Return False
End Function