473,394 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

WMP Activex usage

347 100+
does anyone know how to stop an mp3 file playing automatically using WMP Activex in an access form.

I have the form and the Activex getting its file from a form property but when i goto the next record it starts oplaying the file instantly, i want it not to play untill i press the play button on the WMP
Apr 6 '09 #1
8 3655
NeoPa
32,556 Expert Mod 16PB
I'm not sure Colin. What type of control are you putting it in (Please provide the design details where possible)? And what, if any, code is associated with it already?
Apr 6 '09 #2
colinod
347 100+
Hi

I am using the Windows Media Player Activex control, that just looks like Windows Media Player when dragged onto the form.

The only code associated with it is

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Current()
  2. Me.WindowsMediaPlayer7.URL = Me.[File]
  3. ' Provide a record counter for using with
  4. ' custom navigation buttons (when not using
  5. ' Access built in navigation)
  6.  
  7.     Set rst = Me.RecordsetClone
  8.  
  9.     With rst
  10.         .MoveFirst
  11.         .MoveLast
  12.         lngCount = .RecordCount
  13.     End With
  14.  
  15. 'Show the result of the record count in the text box (txtRecordNo)
  16.  
  17.     Me.txtRecordNo = "Record " & Me.CurrentRecord & " of " & lngCount
  18.  
  19.  
  20. End Sub
of which only first line is associated with the player

This relates to a memo field in the form that contains the relative path to the mp3 file
Apr 6 '09 #3
FishVal
2,653 Expert 2GB
Try the following
Expand|Select|Wrap|Line Numbers
  1. Me.WindowsMediaPlayer7.Object.settings.autoStart = False
  2.  
Apr 6 '09 #4
NeoPa
32,556 Expert Mod 16PB
You may also (as an alternative) get away with leaving line #2 out of the OnCurrent event procedure and adding it to the OnClick event procedure of your CommandButton instead.
Apr 6 '09 #5
FishVal
2,653 Expert 2GB
:-D

I've just imagined that glamorous hi-fi WMP control and Access button "Play" or even "PLAY !!!" next to it. Mesalliance.

Kind regards,
Fish.
Apr 6 '09 #6
colinod
347 100+
ive added the code after the original forst line and all is great

thanks for your help
Apr 6 '09 #7
FishVal
2,653 Expert 2GB
You are welcome.

BTW, I guess it would be enough to run this code once in Form_Load event handler. However, it is not that important.
Apr 6 '09 #8
ChipR
1,287 Expert 1GB
@FishVal
Learn Access tricks and increase your vocabulary at the same time! Thanks Fish!
Apr 6 '09 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: dw85745 | last post by:
PROBLEMS I Haven't solved: 1. Timing issue between real-time server #1 and my drawing tools. Will moving the tools (currently within module) to an ActiveX (exe or DLL) solve the problem or...
0
by: BestNews | last post by:
OS: XP ..Net= framework = 1.0.3705 VS.Net IDE = 7.0.9466 1. I used an ActiveX control in C# client Application. After executing Aximp of ActiveX control. I derived a class from the AxHost.
4
by: Rob Allen | last post by:
Hi Folks. This is more of a "thinking about" post than a real question with a solution. That being said, here we go: Microsoft has in fact lost a patent infridgment suit which will cost them...
4
by: pantagruel | last post by:
I was wondering if anyone has enough familiarity with the ActiveX scripting implementation of javascript to answer if it would be possible to define a new language for the engine, and for the...
2
by: S.Kartikeyan | last post by:
Hello, I have an activex control in a windows form. When i load a document url in the activex control and when the user clicks some other url within the active control html document i want to...
4
by: Brian | last post by:
Hi, I'm trying to make an online FTP utility in C# ASP.NET using MSINET.ocx (an active X control a.k.a. "Microsoft Internet Transfer Control") I've added the reference into my project and have...
7
by: Jarod_24 | last post by:
I just downloaded a activex control that was written in C# and tried to view it on my PDA's Internet Explorer. At my regular PC it displayed just fine, but nothing showed up on the pda. Do...
0
by: Jeff | last post by:
Banging my head against the wall trying to figure this out. I have a 'sometimes' hang while disposing a form which contains an ActiveX control (Flash.ocx version 7). The form's Dispose() method...
1
by: Adam Clauss | last post by:
We have created an ActiveX control (a series of them actually) which can be loaded into Internet Explorer and accessed via Javascript using the techniques described here:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.