Programación General > Visual Basic 6.0 e inferiores
Re: GetOpenFileName , GetSaveFileName
RadicalEd:
GRACIAS POR LA INFORMACION Brroz
ES DE MUCHA AYUDA PARA TODOS
Brroz:
Para Asa (y a quien interes, por supuesto):
Puedes obtener un cuadro de diálogo para seleccionar una carpeta mediante este código:
--- Código: Text --- Option Explicit 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 LongEnd TypePrivate Declare Function SHGetPathFromIDList Lib "shell32.dll" Alias "SHGetPathFromIDListA" (ByVal pidl As Long, ByVal pszPath As String) As LongPrivate Declare Function SHBrowseForFolder Lib "shell32.dll" Alias "SHBrowseForFolderA" (lpBrowseInfo As BROWSEINFO) As Long Public Function SeleccionarPath(Byval HWnd as long, Byal Titulo as strinh) As string Dim bInf As BROWSEINFO Dim lRc As Long Dim lPathID As Long Dim sPath As String If Titulo = "" Then Titulo = "Recuperar vía de acceso" bInf.hOwner = hWnd bInf.lpszTitle = Titulo bInf.ulFlags = BIF_RETURNONLYFSDIRS lngPathID = SHBrowseForFolder(bInf) sPath = String(512, Chr(0)) lRc = SHGetPathFromIDList(lPathID, sPath) If lRc > 0 Then SeleccionarPath = Left(sPath, InStr(1, sPath, Chr(0)) - 1) End Function
Abur.
Navegación
[*] Página Anterior
Ir a la versión completa