Mouse Move with Sound

I have an area (image) on the form. I want if mouse move to that area, the sound (.wav) will play.
But why, if the mouse still in that area, and i move the mouse very little, the sound play again.
All I want is only just one time the sound will play if the mouse move to that area.

Please somebody help me...

Thank's very very much.

Comments

  • : I have an area (image) on the form. I want if mouse move to that area, the sound (.wav) will play.
    : But why, if the mouse still in that area, and i move the mouse very little, the sound play again.
    : All I want is only just one time the sound will play if the mouse move to that area.

    Sounds like you are using OnMouseMove to tell when the user moves the mouse over the image? If so, thats the problem. It will trigger the event whenever the mouse is moved over it regardless of what the last position the mouse was.

    Im not sure if it is in older delphi versions, but Delphi 6 has an OnMouseEnter event which should do exactly what you want.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion