| | |
how to insert sound in vb6 programming
![]() |
•
•
Join Date: Jul 2007
Posts: 12
Reputation:
Solved Threads: 0
Hi, you can use this code:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
'First add the ActiveX MMControl Option Explicit Private Sub Form_Load() Dim AppPath As String 'Appointment of music file from within your program If Right$(App.Path, 1) <> "\" Then AppPath = App.Path & "\Sound.wav" Else AppPath = App.Path & "Sound.wav" End If 'Determine the type of music file MMControl1.DeviceType = "waveaudio" 'If the file type " MIDI " 'MMControl1.DeviceType = "Sequencer" 'Determining file name MMControl1.FileName = AppPath 'Opening the file MMControl1.Command = "open" 'Reading file MMControl1.Command = "play" End Sub Private Sub MMControl1_Done(NotifyCode As Integer) 'This event at the end of passage voice 'Re-reading passage voice MMControl1.Command = "prev" 'Reading passage voice again MMControl1.Command = "play" End Sub
hi !!! could you tell me how to make this code point to exactly where the file located , for i.e, D:\...\sound.wav
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
AppPath = App.Path & "\Sound.wav"
![]() |
Similar Threads
- how can i find "Software Version" using VB6? (Visual Basic 4 / 5 / 6)
- Help installing sound card correctly! (PCI and Add-In Cards)
- I Need A Good Book (C++)
- reading and saving data to textfiles... (Visual Basic 4 / 5 / 6)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: generating one report from multiple tables
- Next Thread: vb and access
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college 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 save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows






