Ver Mensaje Individual
  #3 (permalink)  
Antiguo 30 de marzo,2005, 12:07
Guest
 
Mensajes: n/a
Predeterminado Re: Cambiar imagen usando el evento MouseMove

Este es un ejemplo que use para poder hacer el sawp de imagenes.

Option Explicit

Private Declare Function GetCapture Lib "user32" () As Long
Private Declare Function SetCapture Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function ReleaseCapture Lib "user32" () As Long

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
With Me
If GetCapture <> .hwnd Then SetCapture .hwnd
If X < 0 Or Y < 0 Or X > .ScaleWidth Or Y > .ScaleHeight Then ' fuera del form
ReleaseCapture
Debug.Print "afuera"
Else
' dentro del form
Debug.Print "adentro"
End If
End With
End Sub

Cita:
Iniciado por Anonymous
Si la imagen no ocupa todo el formulario, apoyate en el evento MouseMove del formulario y vuelve a restaurar tu imagen.

Saludos.

Cita:
Iniciado por diego
Tengo una imagen en mi formulario, con la que quiero que cuando el puntero del mouse pase sobre ella esta cambie por otra imgen.
Lo que hice fue usar el evento MouseMove de dicha imagen. Hasta ahi todo funciona bien. El problema que tengo que es que no se como hacer para que cuando el puntero salga de la imagen se vuelva a cargar la imagen original.

Desde ya, muchas gracias.
Responder Citando