View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
ZipCurs ZipCurs is offline
external usenet poster
 
Posts: 103
Default Setting Start Point in Hyperlinked Video

Hello Joel,

I decided to be stubborn and it payed off to some extent. I now have the
following code for running an embedded Windows Media Player on a userform.
It actually starts where I want it to!

Dim MyStart As Long
MyStart = 30 'This seems to be in seconds

Application.EnableEvents = True
Load UserForm1
UserForm1.Caption = "My File : MyStart - MyFinish"
UserForm1.WindowsMediaPlayer1.settings.autoStart = False

UserForm1.WindowsMediaPlayer1.URL = "C:\Myfile.mpg"
UserForm1.WindowsMediaPlayer1.Controls.currentPosi tion = MyStart 'Jumps
to start location
UserForm1.WindowsMediaPlayer1.Controls.Play
UserForm1.Show

Do you have any ideas for how to stop this? I could use Application.OnTime,
but this seems a little lame. Is there some way of monitoring
Controls.currentPosition?

"ZipCurs" wrote:

Hello Joel,

Thanks again for your support on this. Lamely, my ultimate solution might
just be putting the start and stop times in the UserForm caption, and let the
user deal with it.

"joel" wrote:


I've given up trying to use the Wijndows Media Player from VBA. I
didn't find much info on the web the last time I attempteed to program
the media player. I tried finding the DLL but there were a few
different DLL and the commands went well documented. People wanted to
get the music libraries into excel and I gave up.


VBA is really meant to be used by office products and other
functionality is there using the windos dll but it is not well
documented except for the web forums. You can get to a lot of features
using the VBA Reference libraries (menu tools - Reference). but you have
to know which function is in which library which isn't always easy to
find. Most of the experts learned using C lanaguage and adapted their C
Language expertese to VBA.

Microsoft compilers (Basic and C) have the libraries better documented
but the compilers still use the windos Dll just like VBA.


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=176787

Microsoft Office Help

.