[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 500
  • Last Modified:

Load Play and Pause wav file with embedded Windows Media PLayer in Form

Im new to EE. Have sourced alot of help from here in the past, hope you can helpme with this.
I need to Load and play / Pause a wav file in an embedded WMP.
Cannot access the my WMP in the Object browser, Access says it cannot jump to WMP as it is in my DB which is not currently referenced.
Need to get this up an running real fast, Can anyone instruct me on accessing the play and pause features of wmp

Would be much appreciated,
Thanks in advance!
0
HarperBen
Asked:
HarperBen
  • 6
  • 5
1 Solution
 
HarperBenAuthor Commented:
Sorry, It may be as simple as registering WMP, which i dont know if i have done properly?
0
 
rockiroadsCommented:
Is it imperative you need to use WMP

There is an ActiveX Control for Windows Media Player, are you using that

an alt way to play waves is as follows



Private Declare Function sndPlaySoundA Lib "WINMM.DLL" (ByVal lpszSoundName As String, ByVal ValueFlags As Long) As Long
Global Const SND_SYNC = &H0
Global Const SND_ASYNC = &H1
Global Const SND_NODEFAULT = &H2
Global Const SND_LOOP = &H8
Global Const SND_NOSTOP = &H10


Public Sub PlayWave()
    PlayWavFile "C:\WinnT\Media\chimes.wav"
End Sub

Public Sub PlayWavFile(ByVal pFilename As String)

  Dim Ret As Long
 
  Ret = sndPlaySoundA(pFilename, SND_ASYNC Or SND_NODEFAULT)
End Sub
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
HarperBenAuthor Commented:
It is sort of important to use WMP as I will be asking operators to transcribe into the DB from these wave files so I need all the play pause and scroll back sort of options.
Cant get your ALt option to work, This is my inexperience, I will continue to try now,
However I am most interested in using the WMP alternative and would apreciate any explanation on how referencing works and why I do not have all the options for WMP that others do, for example .open and .play, how do i add the necessary references toget acess to the commands i need.
Thanks
0
 
rockiroadsCommented:
yea, I got the ALT option to work, it successfully plays chimes.wav

Let me try find out about the WMP
0
 
rockiroadsCommented:
Im assuming you are using the windows media player control

if you created the windows media player activex control in the form, the reference should be added (you can check this by opening up a module then going to Tools/References)

Windows Media Player should be checked

so far, I got this to open and play a file

WMP.URL = <full path of file>

Apparently you can use the Controls object to play, stop and pause. I saw this in MSDN but cant get my sample code to work

But check this site out, you might have some success

http://www.devcity.net/forums/faq.asp?fid=36&cat=General#TID18760
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmplay/mmp_sdk/controlreference.asp


0
 
HarperBenAuthor Commented:
FANTASTIC,
WMP.URL = <full path of file>, loads and plays the file, i can then use the play pause options in the media player window to achive the rest.
Thank you for your help,
Now i will have to work out how to close this question and how this points thing works,
0
 
HarperBenAuthor Commented:
Thanks again for your help, I really needed this operational for monday.
0
 
rockiroadsCommented:
glad to be of help, Ive learnt something about the WMP as well

probably not required for your current solution, but keep in mind the alt. solution, that can come in handy sometimes, just to play quick waves, might be useful for you sometime
0
 
HarperBenAuthor Commented:
Accept rockiroads comment as answer. Thanks
0
 
HarperBenAuthor Commented:
Sorry, This question was not abondonded, I neded help fast I had sucess with rockiroads answer,
Please close this question, and let me know if I have further steps to take to ensure rockiroads is awarded his/her due points

Thanks
EE Novice
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

  • 6
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now