MouseMove

  • Thread starter Thread starter Tim
  • Start date Start date
T

Tim

This is a part of the function I want to use on my form
for each label MouseMove.
How can I set this up that if you are already on this
label, it's not going to repeat the sound over and over
for each move?
The sound should execute only once for each label


Function WavPlay()
Dim A As Long
Dim strWav As String
strWav = "c:\mydone.wav"
A = fPlayStuff(strWav)
End Function

Thanks

Tim
 
Here's an idea...

When I want to do something like this, I set up a form or
global variable. I then add code something like this:

If X = 1 then end else play my wave!
X = 1
End sub

Or...

If x = 1 then
Play my wave
X = 1
End if
X = 1
End Sub

There are probably several variations on the above. You
can use a modified version to play a different sounc the
second and/or third, etc. time it is executed.
 
Dank,
Thanks for the Idea.

However, I need additional help.
I have 5 labels.
I want the sound should execute only at the first
MouseMove for each label,
So I'll have to add after play my wave x = 2 so it will
not execute the sound at the second move.
However, I do I reset it to x =1

Thanks
Tim
 
James and Dank,
Thanks for your help.

Maybe I'm missing something.
I have 5 labels.
Each label is one inch big, so just to go over the label
once, the On Mouse Move event runs several times.
So if I set the Tag to "1" it will not play it. However
how do I set the Tag back to "" ?
If I say on mouse Move Me.Tag = "" it will constantly
replay the sound.

I need your help.
Thanks
Tim
 
I am not sure I follow. From what you say, you want to sound to play the
first time the mouse is moved over each control on the form. The tag
property will be retained until the form is closed. So, when the user
re-opens the form the tag value will be reset & thus the sound will play
once again.

Do you need the sound to play once per record?
This being the case, you need to add code to the form_current event
resetting the tag values for the controls in question.



--
Cheers,


James Goodman MCSE, MCDBA
http://www.angelfire.com/sports/f1pictures
 
Back
Top