Buenas a todos, soy nuevo en el foro estoy intentando aprender vb6...
Tengo este codigo para cargar imagenes aleatortias desde app.path:
El problema es que mi idea es que cuando las 3 imagenes sean iguales salga un msgbox a ver si alguien me puede ayudar se lo agradeceria mucho...Código:Private Sub Form_Load() File1.Pattern = "*.jpg;*.bmp;*.Gif" File1 = App.Path End Sub Private Sub Command1_Click() If File1.ListCount <= 0 Then MsgBox "No hay archivos de imagen en el directorio" Else Dim aleatorio As Integer aleatorio = Int(((File1.ListCount - 1)) * -1 * Rnd + File1.ListCount - 1) Image1.Picture = LoadPicture(App.Path + "\" + File1.List(aleatorio)) aleatorio = Int(((File1.ListCount - 1)) * -1 * Rnd + File1.ListCount - 1) Image2.Picture = LoadPicture(App.Path + "\" + File1.List(aleatorio)) aleatorio = Int(((File1.ListCount - 1)) * -1 * Rnd + File1.ListCount - 1) Image3.Picture = LoadPicture(App.Path + "\" + File1.List(aleatorio)) End If End Sub
Saludos a tod@s y gracias de antemano

LinkBack URL
About LinkBacks
Citar
