We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

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

HarperBen
HarperBen asked
on
Medium Priority
565 Views
Last Modified: 2008-03-17
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!
Comment
Watch Question

Author

Commented:
Sorry, It may be as simple as registering WMP, which i dont know if i have done properly?
CERTIFIED EXPERT
Top Expert 2006

Commented:
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
CERTIFIED EXPERT
Top Expert 2006

Commented:

Author

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
CERTIFIED EXPERT
Top Expert 2006

Commented:
yea, I got the ALT option to work, it successfully plays chimes.wav

Let me try find out about the WMP
CERTIFIED EXPERT
Top Expert 2006
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview

Author

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,

Author

Commented:
Thanks again for your help, I really needed this operational for monday.
CERTIFIED EXPERT
Top Expert 2006

Commented:
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

Author

Commented:
Accept rockiroads comment as answer. Thanks

Author

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
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.