I have a question regarding controlling a Windows Media Player embedded into an Access Form. I am currently on Access 2003 through Windows 7 32bit and using Windows Media Player 12.
I am building a database for the various sketch comedy show videos that I have downloaded over time (I am a fanatic of Kids In The Hall, Upright Citizens Brigade and the ilk.) I am trying to file them by certain segments of the entire episode so that I have a list of my favorite sketches to choose from and watch. The data is being entered into a table through a form and is built something like this: ID(PK), name (Just a name for the title I give it), series (an ID from another table that lists the various sketch show series), starttime (Format: h:mm:ss and indicates the point in the video file where the particular segment starts), endtime (same format as before except that this indicates end time), runtime (calculated based on start and end time through the entry form… just a bit if nerdy info I like to have.. not necessarily needed but not necessarily getting in the way…) and URL (location in my computer where file is located.) So a typical entry would go something like this:
ID: 4
name: Crushing Your Head vs. Pinching Your Face
series: 3 (In this case indicating that it is Kids In The Hall)
starttime: 0:12:32
endtime: 0:19:45
runtime: 0:07:13
URL: C:/Users/My_Videos/kidsinthehallse2ep4.wmv
Once the data is in, I can view it through a Windows Media Player that I have embedded on a form (I was originally going to just hyperlink the file URL but thanks to another thread here, found out that this is the MUCH cooler way to do it!) using the code below:
Private Sub Form_Load()
Me.WindowsMediaPlayer03.URL = Me.URL
End Sub
The code works fine but starts the video at 0:00:00 of the file and I would have to manually search through the video file for the segment I want to watch based on the start and end time info that is displayed. I was hoping to go one further and write some kind of code that would start playing the video file at the beginning of the segment (in the case of the example above at 0:12:32) and maybe even one that stops it once it reaches the end time.
I went into the properties of the WMP ActiveX control and noticed that under the Advanced tab that there was something called “Current position” that seems to control the start time of the file calculated in seconds (I can get a text box to calculate the seconds using the formula ([starttime]*24)*3600), so I tried writing code for it something like Me.WindowsMediaPlayer03.currentPosition = Me.Text12 but that didn’t work (Currentposition was one of the things listed when I looked up available commands for code pertaining to WMP)
Any suggestions for how I can do this or is this just a pipe dream for now?
I am building a database for the various sketch comedy show videos that I have downloaded over time (I am a fanatic of Kids In The Hall, Upright Citizens Brigade and the ilk.) I am trying to file them by certain segments of the entire episode so that I have a list of my favorite sketches to choose from and watch. The data is being entered into a table through a form and is built something like this: ID(PK), name (Just a name for the title I give it), series (an ID from another table that lists the various sketch show series), starttime (Format: h:mm:ss and indicates the point in the video file where the particular segment starts), endtime (same format as before except that this indicates end time), runtime (calculated based on start and end time through the entry form… just a bit if nerdy info I like to have.. not necessarily needed but not necessarily getting in the way…) and URL (location in my computer where file is located.) So a typical entry would go something like this:
ID: 4
name: Crushing Your Head vs. Pinching Your Face
series: 3 (In this case indicating that it is Kids In The Hall)
starttime: 0:12:32
endtime: 0:19:45
runtime: 0:07:13
URL: C:/Users/My_Videos/kidsinthehallse2ep4.wmv
Once the data is in, I can view it through a Windows Media Player that I have embedded on a form (I was originally going to just hyperlink the file URL but thanks to another thread here, found out that this is the MUCH cooler way to do it!) using the code below:
Private Sub Form_Load()
Me.WindowsMediaPlayer03.URL = Me.URL
End Sub
The code works fine but starts the video at 0:00:00 of the file and I would have to manually search through the video file for the segment I want to watch based on the start and end time info that is displayed. I was hoping to go one further and write some kind of code that would start playing the video file at the beginning of the segment (in the case of the example above at 0:12:32) and maybe even one that stops it once it reaches the end time.
I went into the properties of the WMP ActiveX control and noticed that under the Advanced tab that there was something called “Current position” that seems to control the start time of the file calculated in seconds (I can get a text box to calculate the seconds using the formula ([starttime]*24)*3600), so I tried writing code for it something like Me.WindowsMediaPlayer03.currentPosition = Me.Text12 but that didn’t work (Currentposition was one of the things listed when I looked up available commands for code pertaining to WMP)
Any suggestions for how I can do this or is this just a pipe dream for now?