Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 107
Default windows media player commands

Hello

Does anyone know if its possible to make use of the crossfading facility of
Widows Media Player 11 in an embedded userform?

Many thanks

tp


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default windows media player commands

There are two ways of controlling a window application from excel using macros

1) Send shortcut keys using the ON Key Command. I don't think there are
shortcut keys that would allow you to control the cross fading.

2) The WPM.DLL is the WIN32 application for the windows Media Player. You
can define the library functions in Visaul basic and the call all the windows
Media functions from Excel VBA. I tried find an example on the internet and
was not successful using the WPM.DLL. I have done this with other Win32
DLL's.

"teepee" wrote:

Hello

Does anyone know if its possible to make use of the crossfading facility of
Widows Media Player 11 in an embedded userform?

Many thanks

tp



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 107
Default windows media player commands

Thanks Joel

I was hoping to find the crossfader command specifically but it doesn't
appear to be a supported media function AFAIK

"Joel" wrote in message
...
There are two ways of controlling a window application from excel using
macros

1) Send shortcut keys using the ON Key Command. I don't think there are
shortcut keys that would allow you to control the cross fading.

2) The WPM.DLL is the WIN32 application for the windows Media Player. You
can define the library functions in Visaul basic and the call all the
windows
Media functions from Excel VBA. I tried find an example on the internet
and
was not successful using the WPM.DLL. I have done this with other Win32
DLL's.

"teepee" wrote:

Hello

Does anyone know if its possible to make use of the crossfading facility
of
Widows Media Player 11 in an embedded userform?

Many thanks

tp





  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,344
Default windows media player commands

Hi,

What is an imbedded userform in Excel?

And what is a crossfading facility?
--
Thanks,
Shane Devenshire


"teepee" wrote:

Hello

Does anyone know if its possible to make use of the crossfading facility of
Widows Media Player 11 in an embedded userform?

Many thanks

tp



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 107
Default windows media player commands

A embedded userform is where you embed a media player in a userform.

A crossfade facility is the capacity for Windows Media Player to crossfade
two consecutive tracks when they are part of a playlist.


"ShaneDevenshire" wrote in
message ...
Hi,

What is an imbedded userform in Excel?

And what is a crossfading facility?
--
Thanks,
Shane Devenshire


"teepee" wrote:

Hello

Does anyone know if its possible to make use of the crossfading facility
of
Widows Media Player 11 in an embedded userform?

Many thanks

tp







  #6   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.misc
external usenet poster
 
Posts: 107
Default windows media player commands


To clarify, the below code is designed to add a new file to a playlist every
time cell A1 changes. What I hoped would happen is that when the currently
playing file comes to the end, WMP will crossfade into the next one as it
does when playing standalone version (if you have crossfade selected as an
option.) But it doesn't and I was wondering if there was a reason or a
workaround.

Private Sub UserForm_Activate()

Me.WindowsMediaPlayer1.settings.requestMediaAccess Rights (full)
'open up playlist called excel
Me.WindowsMediaPlayer1.playlistCollection.getByNam e ("Excel")
'make sure playlist is empty
Me.WindowsMediaPlayer1.currentPlaylist.Clear
'add the first file to play
Set newMedia = Me.WindowsMediaPlayer1.newMedia("c:\video\file" & Range("a1")
& ".mp3")
Me.WindowsMediaPlayer1.currentPlaylist.insertItem 0, newMedia
'start playing
Me.WindowsMediaPlayer1.Controls.Play
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
'when cell A1 changes, summon the macro which will change the audio
If Target.Address = "$A$1" Then
Call Startone
End If
End Sub

Sub Startone()
'adds the next audio in the sequence onto the end of the playlist, deriving
fron the value of cell A1
UserForm4.WindowsMediaPlayer1.currentPlaylist.appe ndItem
UserForm4.WindowsMediaPlayer1.newMedia("c:\video\f ile" & Range("a1") &
".mp3")
' jumps to two seconds before the end of the current file so that crossfade
can happen
UserForm4.WindowsMediaPlayer1.Controls.currentPosi tion =
UserForm4.WindowsMediaPlayer1.currentMedia.duratio n - 2
End Sub


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Media player in active X teepee[_3_] Excel Discussion (Misc queries) 16 October 28th 08 10:46 PM
Windows Media Player disables Clipboard in Excel jmaskew Excel Discussion (Misc queries) 0 August 29th 08 01:56 AM
Close Windows Media Player Cordell Excel Discussion (Misc queries) 1 January 30th 07 04:43 AM
Force asx to bring up Windows Media Player - How? chaser7016 Excel Discussion (Misc queries) 1 January 23rd 07 01:09 PM
Media Player versus Windows Media Player teepee Excel Discussion (Misc queries) 1 October 14th 05 02:25 AM


All times are GMT +1. The time now is 06:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"