Ver Mensaje Individual
  #2 (permalink)  
Antiguo 06/04/2014, 12:09
UsuarioArroba
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: Visual Basic 6 - No logro cargar solo un archivo, tienen que ser mas a la

Solucionado del siguiente modo:

Código:
        Dim archivos() As String
        Dim i As Long, flag As String
        flag = cdlOFNAllowMultiselect Or cdlOFNExplorer Or cdlOFNHideReadOnly
        With CommonDialog1
        .FileName = ""
        .MaxFileSize = 32000
        .FLAGS = flag
        .ShowOpen
        End With
        archivos = Split(CommonDialog1.FileName, Chr(0))
        b = 0
        numero_archivos = UBound(archivos)
        For i = 0 To UBound(archivos)
        arraycant(b) = archivos(i)
        b = b + 1
        Next i
        Erase archivos
        preruta = arraycant(0) + "\" + arraycant(1)
        letra = Right(preruta, 1)
        If letra = "\" Then
        ruta = Mid$(preruta, 1, Len(preruta) - 1)
        Label1.Caption = ruta
        Image1.Picture = LoadPicture(ruta)
        contador_imagen = contador_imagen + 1
        Else
        Label1.Caption = preruta
        Image1.Picture = LoadPicture(preruta)
        contador_imagen = contador_imagen + 1
        End If