Visual Basic - Moverme por un directorio de imágenes

Life is soft - evento anual de software empresarial
 
Vista:

Moverme por un directorio de imágenes

Publicado por Digitalia (3 intervenciones) el 05/05/2007 09:32:46
Hola de nuevo,,

estoy haciendo una aplicación y necesito como poder avanzar por un directorio viendo fotos, es decir, como si fuese un visor de imágenes y cuando yo le doy a "siguiente" que me cargue la fotografía siguiente de ese directorio en una formulario y lo mismo con anterior.

Saludos
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
sin imagen de perfil
Val: 119
Ha disminuido 1 puesto en Visual Basic (en relación al último mes)
Gráfica de Visual Basic

RE:Moverme por un directorio de imágenes

Publicado por christian (713 intervenciones) el 05/05/2007 20:05:19
Yo usaria 3 controles para buscar el directorio con las imagenes

DriveListBox
DirListBox
FileListbox

en una variable sumaria o restaria 1 , teniendo en cuenta el filelistcount (la cantidad de imagenes en el directorio elegido) para ir mostrando las imagenes en un picture o image

'-----------------------------------------------------------------------------------------------------------

Private Sub Command1_Click()
On Error Resume Next
If Val(Text1.Text) = 0 Then
Text1.Text = File1.ListCount
Else
Text1.Text = Val(Text1.Text) - 1
End If
Image1.Picture = LoadPicture(Dir1.Path & "\" & File1.List(Val(Text1.Text)))
File1.Selected(Val(Text1.Text)) = True
End Sub

Private Sub Command2_Click()
On Error Resume Next
If Val(Text1.Text) = File1.ListCount Then
Text1.Text = "0"
Else
Text1.Text = Val(Text1.Text) + 1
End If
Image1.Picture = LoadPicture(Dir1.Path & "\" & File1.List(Val(Text1.Text)))
File1.Selected(Val(Text1.Text)) = True
End Sub

Private Sub Dir1_Change()
File1.Path = Dir1.Path
Text1.Text = File1.ListCount
End Sub

Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar