Solved

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

Posted on 2004-03-22
13
434 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
  • 6
  • 5
13 Comments
 
LVL 4

Author Comment

by:HarperBen
Comment Utility
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
Comment Utility
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
 
LVL 65

Expert Comment

by:rockiroads
Comment Utility
0
 
LVL 4

Author Comment

by:HarperBen
Comment Utility
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
Comment Utility
yea, I got the ALT option to work, it successfully plays chimes.wav

Let me try find out about the WMP
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 65

Accepted Solution

by:
rockiroads earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks again for your help, I really needed this operational for monday.
0
 
LVL 65

Expert Comment

by:rockiroads
Comment Utility
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
Comment Utility
Accept rockiroads comment as answer. Thanks
0
 
LVL 4

Author Comment

by:HarperBen
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
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…

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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now