Ver Mensaje Individual
  #4 (permalink)  
Antiguo 31/05/2005, 10:12
5v5
 
Fecha de Ingreso: abril-2005
Ubicación: Huehuetoca, Mexico
Mensajes: 138
Antigüedad: 20 años
Puntos: 0
hola, gracias por su ayuda...

miren investigando encontre y modifique el siguiente codigo...

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, pero tambien quiciera saber que devo de modificar para que cuando me aparesca la ventana solo me muestre los grupos de trabajo y las pc, y no las carpetas compartidas...
gracias