[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2004-03-22
13
Medium Priority
?
497 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!
0
Comment
Question by:HarperBen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
13 Comments
 
LVL 4

Author Comment

by:HarperBen
ID: 10647732
Sorry, It may be as simple as registering WMP, which i dont know if i have done properly?
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 10647902
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 4

Author Comment

by:HarperBen
ID: 10653219
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
 
LVL 65

Expert Comment

by:rockiroads
ID: 10656767
yea, I got the ALT option to work, it successfully plays chimes.wav

Let me try find out about the WMP
0
 
LVL 65

Accepted Solution

by:
rockiroads earned 2000 total points
ID: 10657154
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
 
LVL 4

Author Comment

by:HarperBen
ID: 10662615
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
 
LVL 4

Author Comment

by:HarperBen
ID: 10662628
Thanks again for your help, I really needed this operational for monday.
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 10665364
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
 
LVL 4

Author Comment

by:HarperBen
ID: 10665390
Accept rockiroads comment as answer. Thanks
0
 
LVL 4

Author Comment

by:HarperBen
ID: 11085443
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

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question