?
Solved

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

Posted on 2004-03-22
13
Medium Priority
?
492 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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Suggested Courses

771 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