Home‎ > ‎

Abrir Cuadro Dialogo

Option Compare Database
Option Explicit
'***************************************************************
'&                                                            &*
'&                                                            &*
'&                                                            &*
'&                                                            &*
'&               Jefferson Jimenez (JJJT)                     &*
'&                 Cabimas - Venezuela                        &*
'&                    Julio - 2009                            &*
'&                                                            &*
'&                                                            &*
'&                                                            &*
'&                                                            &*
'&                                                            &*
'***************************************************************
Public Var As String
' Función Api GetOpenFileName _
 para abrir el cuadro de diálogo seleccionar archivo
Public Declare Function JJJT_Dialog Lib "comdlg32.dll" _
    Alias "GetOpenFileNameA" ( _
    pOpenfilename As OPENFILENAME) As Long

' Estructure de datos _
  OPENFILENAME para usar con GetOpenFileName
Public Type OPENFILENAME
    Tamaño_JJJT As Long
    Hwnd_JJJT As Long
    Ins_JJJT As Long
    Filtro_JJJT As String
    CFiltro_JJJT As String
    MFiltro_JJJT As Long
    IFila_JJJT As Long
    Fila_JJJT As String
    MFila_JJJT As Long
    LTitulo_JJJT As String
    MTitulo_JJJT As Long
    Disco_JJJT As String
    Titulo_JJJT As String
    JJJT_flags As Long
    O_JJJT As Integer
    Ext_JJJT As Integer
    DE_JJJT As String
    C_JJJT As Long
    HO_JJJT As Long
    N_JJJT As String
End Type

Function JJJT_CuadroDialog(tltFiltro, Directorio As String, Ctr As Control)
Dim El_Archivo As OPENFILENAME
  
    With El_Archivo
        .Tamaño_JJJT = Len(El_Archivo)
        .Ins_JJJT = 1
        .Filtro_JJJT = tltFiltro
        .Fila_JJJT = Space$(254)
        .MFila_JJJT = 255
        .LTitulo_JJJT = Space$(254)
        .MTitulo_JJJT = 255
        .Disco_JJJT = Directorio
        .Titulo_JJJT = "Busque la Base de Datos"
        .JJJT_flags = 0
    End With
  
   'Abrimos el cuadro de diálogo pasándole _
     a GetOpenFileName la estructura anterior
    If JJJT_Dialog(El_Archivo) Then
        MsgBox "Ud. Seleccionó: " + Trim$(El_Archivo.Fila_JJJT), , "Cuadro Dialogo"
        Ctr = Trim$(El_Archivo.Fila_JJJT)
    Else
        MsgBox "Cancelado", , "Dialog"
    End If

End Function

 

SelectionFile type iconFile nameDescriptionSizeRevisionTimeUser
ċ

Descargar
Descargue el Ejemplo  27 kb v. 3 30 sept. 2009 7:01 Jefferson Jimenez
ċ

Descargar
Descargue El Ejemplo  16 kb v. 1 13 sept. 2009 20:23 Jefferson Jimenez
Comments