| | |
Mouse Over Sound Event
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
•
•
Join Date: Jul 2008
Posts: 5
Reputation:
Solved Threads: 0
Hi guys.
Im trying to get a wav file to play on a mouse over event.
I want a wavefile to play when the mouse pointer moves over a label and stop wen it is moved off the label.
I believe this can be done using the sndPlaySound, i have tried and the wav does play, but i need it to stop if the mouse is not on the label.
Thanks in advance.
Im trying to get a wav file to play on a mouse over event.
I want a wavefile to play when the mouse pointer moves over a label and stop wen it is moved off the label.
I believe this can be done using the sndPlaySound, i have tried and the wav does play, but i need it to stop if the mouse is not on the label.
Thanks in advance.
I don't know if this is very effective.
My theory is that if the label detects a mouse_move event then it starts playing. when the mouse moves anywhere else on the form, then stops playing.
So maybe add a mouse_move event on the form it self to stop the music playing
My theory is that if the label detects a mouse_move event then it starts playing. when the mouse moves anywhere else on the form, then stops playing.
So maybe add a mouse_move event on the form it self to stop the music playing
VB Syntax (Toggle Plain Text)
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Debug.Print "stop playing" End Sub Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Debug.Print "play" End Sub
Last edited by bushman_222; Jul 23rd, 2008 at 11:03 am.
•
•
Join Date: Jul 2008
Posts: 5
Reputation:
Solved Threads: 0
Hi, thanks for reply, but it seems to be working when i added the ffg:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) sndPlaySound vbNullString, SND_NODEFAULT End Sub
![]() |
Similar Threads
- Pygame (Python)
- Java Game Characteristics (Java)
- OpenGL (Game Development)
- Slow Computer, slo startup, laggy Sound, after rebooting. (Viruses, Spyware and other Nasties)
- Open Gl Programing Error (help)... (Game Development)
- I lack focus... (Java)
- Zone Alarm Security Alerts. (Viruses, Spyware and other Nasties)
- Windows keeps freezing up (Windows NT / 2000 / XP)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: 554 message rror
- Next Thread: Voice Recognition System
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age append application basic beginner birth bmp calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver subroutine table tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





