miren en la web encontre y modifique el siguiente codigo... el cual abre un una ventana, como la del command dialog, en la que se muestra el entorno de red, pero tambien me aparecen las carpetas compartidas, y yo lo que quiero que me aparezca, es solamente mis grupos de trabajo .....y no las carpetas compartidas....ayuda donde me hace falta modificar.....
Option Explicit
Private Const ERROR_SUCCESS As Long = 0
Private Const MAX_PATH As Long = 260
Private Const CSIDL_NETWORK As Long = &H12
Private Const BIF_RETURNONLYFSDIRS As Long = &H1
Private Const BIF_BROWSEFORCOMPUTER As Long = &H1000
Private Type BROWSEINFO
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
Private Declare Function SHBrowseForFolder Lib "shell32.dll" _
Alias "SHBrowseForFolderA" _
(lpBrowseInfo As BROWSEINFO) As Long
Private Declare Function SHGetSpecialFolderLocation _
Lib "shell32.dll" _
(ByVal hwndOwner As Long, _
ByVal nFolder As Long, _
pidl As Long) As Long
Private Declare Sub CoTaskMemFree Lib "ole32.dll" _
(ByVal pv As Long)
Private Function GetBrowseNetworkWorkstation() As String
Dim BI As BROWSEINFO
Dim pidl As Long
Dim sPath As String
Dim pos As Integer
If SHGetSpecialFolderLocation(Me.hWnd, CSIDL_NETWORK, pidl) = RROR_SUCCESS then
With BI
.hOwner = Me.hWnd
.pidlRoot = pidl
.pszDisplayName = Space$(MAX_PATH)
.lpszTitle = "Select a network computer."
.ulFlags = BIF_BROWSEFORCOMPUTER
End With
If SHBrowseForFolder(BI) <> 0 Then
GetBrowseNetworkWorkstation = "\" & BI.pszDisplayName
End If
Call CoTaskMemFree(pidl)
End If
end Function
Private Sub Command1_Click()
Text1.Text = GetBrowseNetworkWorkstation()
End Sub
pero la verdad, no logro entenderlo muy bien, me lo podrian explicar un poquito.....