Hello
I'm using this library from: https://github.com/Tulpep/Active-Directory-Object-Picker
cause its the same as original windows.
So i have issue with getting domain name/name of user when i select it from some group
Private Sub SelectUserOrGroup()
Dim picker As New DirectoryObjectPickerDialog() With {
.AllowedObjectTypes = ObjectTypes.Users Or ObjectTypes.Groups Or ObjectTypes.Computers,
.DefaultObjectTypes = ObjectTypes.Computers,
.AllowedLocations = Locations.All,
.DefaultLocations = Locations.JoinedDomain,
.MultiSelect = True,
.ShowAdvancedView = True
}
Using picker
If picker.ShowDialog() = DialogResult.OK Then
For Each sel In picker.SelectedObjects
Dim aString As String = Replace(sel.Path, "WinNT://WORKGROUP/", String.Empty)
Dim cString As String = Replace(aString, "/", "\")
ComboBox1.Items.Add(cString)
'MsgBox(sel.Path)
Next
End If
End Using
End Sub
if i use it on local pc it will show result: DESKTOP-PTUJXLK\Usera
but when i put the program on my work pc and my network and i select one user from some other group it display it like this:
WinNT://Group/Group/User
any ideas how i can configurate it right in my code to get correct results without this WinNT:\\ message