|
-
November 23rd, 1999, 06:28 PM
#1
PLay WAV ONLY once on MouseMove...How?
I know it's easy but I just can't get it ..(I got it before to work, but something is wrong with me I guess....forgot!
-
November 23rd, 1999, 10:39 PM
#2
Re: PLay WAV ONLY once on MouseMove...How?
I had a similar problem in Access. I wanted to set another object to visible when the control was passed over. And what happened was the other object (a square) would flicker for each movement of the mouse. I had several objects, each of which displayed a different square when passed over (and disappeared again when over another control or the form). I created a string that would be assigned the name of the control when the mouse entered it. I also had a sub that would make all the objects invisible, but I doubt you would need anything like that (mabey to stop another wav from looping).
Sub Object_MouseOver(...........)
...
If strCurrentControl <> Object.Name then
strCurrentControl = Object.Name
... Call ClearAll Sub
... Play sound, or in my case, make objects visible ...
...
End If
...
End Sub
'Note: I used this code in every object, including the form. If you don't,
' you can move the mouse on and off the object without re-triggering
' the desired effect.
Brewguru99
-
November 23rd, 1999, 11:24 PM
#3
Re: PLay WAV ONLY once on MouseMove...How?
Andy,
Use the code below (Set it accordingly)
'on top of the form. This is public to form
Dim Played as Boolean
'In form load event
Played = false
'on form_mousemove event
if not played then
'Andy do what ever you do... :-)
'...
'...
Played = true
end if
I hope that work.
regards,
Santulan
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|