Hi
How can i see the names of all the computers in a network, which are connected to my computer or which my computer is connected to.
Regards
Thomas
Hi
How can i see the names of all the computers in a network, which are connected to my computer or which my computer is connected to.
Regards
Thomas
Computernames
hughbert
Tom. . . this really sucks. . . Unfortunately there is a bug in
System.Windows.Forms.Design.FolderNameEditor
because this code, contrary to the documentation, shows a dialog that is NOT restricted to computers and allows for making a new folder (but you can do it by interopping shell32 or shellapi):
=====================
Imports System.Runtime.InteropServicesImports System.Windows.Forms
Imports System.Windows.Forms.Design
Public Class ComputerBrowser
Inherits System.Windows.Forms.Design.FolderNameEditor
Public Shared Function TrySelectComputer(ByVal owner As IWin32Window, <OutAttribute()> ByRef result As String) As Boolean
result = Nothing
Dim dlg As New FolderNameEditor.FolderBrowser
Dim temp As New ComputerBrowser()
temp.InitializeDialog(dlg)
If dlg.ShowDialog(owner) = DialogResult.OK Then
result = dlg.DirectoryPath
Return True
End If
Return False
End Function
Protected Overrides Sub InitializeDialog(ByVal folderBrowser As System.Windows.Forms.Design.FolderNameEditor.FolderBrowser)
MyBase.InitializeDialog(folderBrowser)
folderBrowser.StartLocation = FolderBrowserFolder.NetworkNeighborhood
folderBrowser.Style = FolderBrowserStyles.BrowseForComputer
End Sub
End Class
=====================
What ewlse sucks is the code I have for the Directory Object Picker is in delphi using the JediLibraries. I don't suppose you have delphi Everyone should. its the best development environment ever released!!!
I found some .NET code for it but it is a C# wrapper around a C++ library (you can find it by googling "IDsObjectPicker CodeProject" and it will do you no good without a C++ compiler.
I could translate the Jedi but it will take me a good while . . . as in days. It would involve writing interop code for the ObjSel.h
Hey you microsoft boys. . . why isn't there a Directory Object Picker in .Net
If you have delphi, in a couple of hours, I could give you code for an activeX wrapper that you could compile and interop .
I could compile you an activex library though I don't know how comfortable you are getting executable code from a stranger on the net.
grrrrrrrrrrr Microsoft you are blowing it!!!
Ankur gupta -
do you want the Shell browser:
or the Directory Object picker :
POV Dev
Thanks Blair Allen Stark
It is allmost what i needed but how can i choose between the shell browser or the dsobjectpicker
Where can i find the objectpicker or even the shellbrowser
Thomas
Sid Sidhartha
the point is, you have to pick the computers that you are making a "sync" relationship between. . .
thats what the DSObjectPicker is for
the idea is, you would have a "Register" menu entry. In this, you would open a form with a listbox of currently registered machines. Initially this would be empty. there would be an add/delete buttons next to this listbox.
clicking add would open a DSObjectPicker, you could directly enter the names of the computers or use the built in "find" functionality. The DSObjectPicker returns a list of computers you could then add to your "Registered Computers" list. then you would persist this info on a DialogResult = ok.
Look at the way IIS and SQL Server manage "registered machines." Essentially, you want to implement the same pattern. the mechanisms for doing this easily are built into the windows OS.
More importantly, if you use this pattern, the workflow of the "registeration" process will be easier to manage.
Now, pulling the DSObjectPicker into .NET takes a little work but there is plenty of code out there that does it.
Again look at IIS.
Look at the System Management Control Panel applet. . .
Look at Event Viewer.
Look at regedit
kuldeept
Are you still with me
here is a .NET object picker from Mr Igor Kissil that was posted on the gotdotnet.ru forum, that I have updated to from 1.1 to 2.0.
It works as expected.
the picker is in C#, but can be referenced in VB.
includes a VB example project (PickerTest) with a reference to the C# library
IMPORTANT: compile before opening the form1 in the PickerTest as the form has the component on it. . . will fail if not compiled.
DOWNLOAD: ObjectPicker.zip
let me know if you have any questions
adil taqi
Cause i can make my own features. I have 2 computers where i would like to sync my favorites immediately when it changes on one of the computers
But. is it possible to get the names and the IP's of the connected computers
Thomas
Edypion
neither. I want to put the names in a listbox, where you can select the names.
my idea is to make a sync. tool
Thomas
Rosen M
Not at all. I'm a newbie to VB. But if it is that difficult then leave it. I don't want to put you into work an not use you work cause I don't know how. I will disale DHCP on my home network and directly enter the IP numberes instead.
I just thought, there were an funktion directly in VB I could use
Thomas
BBN11
This is gonna be c# code. you have the framework SDK. . .right so you can compile the code via csc and then add the assembly as a reference in your VB.net . . does that make sense
Or download c# express. I really don't want to translate this to vb.
You definitely want the object picker.
Give me a day to track this down. work on another part of your app.
Lucky2000
Tom . . . one other option is to issue an ADSI ADO query for computer names.
Other than that, there is also a method, I will have to dig it up as the code, again, is in delphi (man, why doesn't everyone have delphi ) but it is a resource hog and can take more than a minute to return a list.
McAuliffe
jez