hi,
does anyone know the shell command to access network neighborhood
shell "what goes here"
OR ANY OTHER SUGGESTIONS
Cheers
Merlin ?
__________________
Printable View
hi,
does anyone know the shell command to access network neighborhood
shell "what goes here"
OR ANY OTHER SUGGESTIONS
Cheers
Merlin ?
__________________
Maybe you are looking for one ahead of this one..I can't find it...I have almost every shell for windows but I
don't have the one for the dialog box that prerequisits this particular one...maybe you may have a use for it somewhere so I'll post it anyway...
Shell "rundll32.exe shell32.dll,Control_RunDLL netcpl.cpl"
'you can get to it this way as well...not sure what you do with
'it when you get it but this brings it up....
IE...don't ask me anything about this I got if off anther
Q & A search and tried it and it brings up the dialog box.
'use sub Main as startup
Public Declare Sub CoTaskMemFree Lib "ole32.dll" (ByVal pv As Long)
Public Declare Function SHBrowseForFolder Lib "shell32.dll" _
Alias "SHBrowseForFolderA" (lpBrowseInfo As BROWSEINFO) As Long
'Converts an item identifier list to a file system path.
Public Declare Function SHGetPathFromIDList Lib "shell32.dll" _
Alias "SHGetPathFromIDListA" _
(ByVal pidl As Long, _
ByVal pszPath As String) As Long
'parameters for SHBrowseForFolder
Public Type BROWSEINFO 'BI
hOwner As Long
pidlRoot As Long
pszDisplayName As String
lpszTitle As String
ulFlags As Long
lpfn As Long
lParam As Long
iImage As Long
End Type
Public Const CSIDL_NETWORK = &H12 'Network Neighborhood
Public Const MAX_PATH = 260
Public Sub Main()
Dim BIF_FLAGS As Long
Dim sTitle As String
Dim lReturn
lReturn = Browse(BIF_FLAGS, "Network Neighborhood")
End Sub
Private Function Browse(BIF_FLAGS As Long, sTitle As String) As String
Dim pidl As Long
Dim BI As BROWSEINFO
Dim sPath As String
Dim pos As Integer
With BI
.hOwner = hWnd
.pidlRoot = CSIDL_NETWORK
.lpszTitle = "Browsing " & sTitle
.ulFlags = BIF_FLAGS
.pszDisplayName = Space$(MAX_PATH)
End With
pidl = SHBrowseForFolder(BI)
sPath = Space$(MAX_PATH)
If SHGetPathFromIDList(ByVal pidl, ByVal sPath) Then
pos = InStr(sPath, Chr$(0))
If pos Then Browse = Left(sPath, pos - 1)
Else: Browse = ""
Text3 = ""
End If
pos = InStr(BI.pszDisplayName, Chr$(0))
If pos Then Text3 = Left(BI.pszDisplayName, pos - 1)
Call CoTaskMemFree(pidl)
End Function
hi,
thanks i have just tried it but unfourtunateley is doesn't work
any other suggestions anybody ?
Merlin ?