Visual Basic - CAMBIO DE IMAGEN

Life is soft - evento anual de software empresarial
 
Vista:

CAMBIO DE IMAGEN

Publicado por CANDY (4 intervenciones) el 28/02/2003 19:46:14
HOLA A TODOS!

COMO SE HACE PARA QUE UNA IMAGEN CAMBIE ?

TENGO QUE METER VARIOS OBJETOS IMAGEN UNO ENCIMA DE OTRO Y VARIAR EL ATRIBUTO VISIBLE O HAY UNA FORMA MAS ELEGANTE DE HACERLO? (SUPONGO QUE SI ...)

GRACIAS!
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

RE:CAMBIO DE IMAGEN

Publicado por Danny (4 intervenciones) el 28/02/2003 20:09:18
en un objeto image debes llamar al método
Loadpicture(Ruta_archivo)
Por ejemplo, si el image se llama imgPrueba, y quieres cargar el archivo de imagen C:\Mis Documentos\Foto.jpg, es así

imgPrueba = LoadPicture( "C:\Mis Documentos\Foto.jpg")
Así te cargará la imagen.
De nada, chao
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

RE:CAMBIO DE IMAGEN

Publicado por CANDY (4 intervenciones) el 28/02/2003 20:19:51
GRACIAS POR TU RESPUESTA DANNY PERO NO SE SI ES LO QUE BUSCO .. CREO QUE NO ME EXPLIQUÉ BIEN ....

LO QUE QUIERO ES CARGAR EN MEMORIA 7 FOTOS Y QUE DEPENDIENDO DE QUE SE PULSE UN BOTON U OTRO QUE APAREZCA UNA IMAGEN U OTRA ....

PERO LAS IMAGENES SE HAN DE CARGAR EN EL MOMENTO DE LA COMPILACION, NO EN TIEMPO DE EJECUCION DEL PROGRAMA ....

GRACIAS DE NUEVO!
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

RE:CAMBIO DE IMAGEN

Publicado por CANDY (4 intervenciones) el 28/02/2003 20:19:58
GRACIAS POR TU RESPUESTA DANNY PERO NO SE SI ES LO QUE BUSCO .. CREO QUE NO ME EXPLIQUÉ BIEN ....

LO QUE QUIERO ES CARGAR EN MEMORIA 7 FOTOS Y QUE DEPENDIENDO DE QUE SE PULSE UN BOTON U OTRO QUE APAREZCA UNA IMAGEN U OTRA ....

PERO LAS IMAGENES SE HAN DE CARGAR EN EL MOMENTO DE LA COMPILACION, NO EN TIEMPO DE EJECUCION DEL PROGRAMA ....

GRACIAS DE NUEVO!
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

espero esto es lo que quieres

Publicado por Angel (2 intervenciones) el 28/02/2003 21:31:40
es muy facil lo logico seria insertar option button para cada imagen , un commandbutton y claro un control image
y dentro del command button agrega este codigo

If Option1.Value = True Then
Image1.Picture = LoadPicture("c:\imagen\avril.jpg")
ElseIf Option2.Value = True Then
Image1.Picture = LoadPicture("c:\imagen\avril1.jpg")
ElseIf Option3.Value = True Then
Image1.Picture = LoadPicture("c:\imagen\avril2.jpg")
Else
MsgBox "no seleccionaste la imagen deseada", vbInformation, "Aviso"
End If


a el control image colocale en la propiedad stretch el valor true

si no quieres manejar el command button tendrias me colocar este codigo en los options

If Option1.Value = True Then
Image1.Picture = LoadPicture("c:\imagen\avril.jpg")
End If
End Sub

Private Sub Option2_Click()
If Option2.Value = True Then
Image1.Picture = LoadPicture("c:\imagen\avril1.jpg")
End If
End Sub

Private Sub Option3_Click()
If Option3.Value = True Then
Image1.Picture = LoadPicture("c:\imagen\avril2.jpg")
End If
End Sub

si esto no es lo que deseas escribeme y tratare de ayudarte
mi correo es [email protected]
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

espero esto es lo que quieres

Publicado por Angel (2 intervenciones) el 28/02/2003 21:31:47
es muy facil lo logico seria insertar option button para cada imagen , un commandbutton y claro un control image
y dentro del command button agrega este codigo

If Option1.Value = True Then
Image1.Picture = LoadPicture("c:\imagen\avril.jpg")
ElseIf Option2.Value = True Then
Image1.Picture = LoadPicture("c:\imagen\avril1.jpg")
ElseIf Option3.Value = True Then
Image1.Picture = LoadPicture("c:\imagen\avril2.jpg")
Else
MsgBox "no seleccionaste la imagen deseada", vbInformation, "Aviso"
End If


a el control image colocale en la propiedad stretch el valor true

si no quieres manejar el command button tendrias me colocar este codigo en los options

If Option1.Value = True Then
Image1.Picture = LoadPicture("c:\imagen\avril.jpg")
End If
End Sub

Private Sub Option2_Click()
If Option2.Value = True Then
Image1.Picture = LoadPicture("c:\imagen\avril1.jpg")
End If
End Sub

Private Sub Option3_Click()
If Option3.Value = True Then
Image1.Picture = LoadPicture("c:\imagen\avril2.jpg")
End If
End Sub

si esto no es lo que deseas escribeme y tratare de ayudarte
mi correo es [email protected]
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