|
-
Aug 1st, 2009, 08:17 PM
#1
Thread Starter
Fanatic Member
Windows Media Player Control
Ok I have 2 questions:
Question 1:
Is there a way where I can have two times in two captions i.e:
Time1: 2:05 Time2 :3:05
Is there a way where I can tell the Windows Media Player to open a file and play from the start time and stop at the second time?
Question 2:
Is there a way where I can get the current time of the movie playing and put it in a label ?
-
Aug 4th, 2009, 02:47 AM
#2
Thread Starter
Fanatic Member
Re: Windows Media Player Control
-
Aug 13th, 2009, 04:56 PM
#3
Thread Starter
Fanatic Member
Re: Windows Media Player Control
I want the move to start at "1:10" and I have:
vb Code:
MovieS.Controls.currentPosition = "0110"
Why dosent this work?
-
Aug 14th, 2009, 02:59 AM
#4
Thread Starter
Fanatic Member
Re: Windows Media Player Control
So can this be done with the media player control or do I have to look elsewhere?
-
Oct 22nd, 2009, 11:25 AM
#5
Thread Starter
Fanatic Member
Re: Windows Media Player Control
What is the proper way to declaring a start position and a ending position for the Windows Media Player Control? So when a button is pressed it gets the start position from a textbox and a timer will check the current position and compare the time to whats in another textbox and if the position is equal then the movie stops.
-
Oct 27th, 2009, 11:25 AM
#6
Thread Starter
Fanatic Member
Re: Windows Media Player Control
-
Oct 27th, 2009, 02:46 PM
#7
Re: Windows Media Player Control
CurrentPosition must be in seconds. If you want it to start at "1:10", then you should set it to "70".
vb Code:
Private Sub Form_Load()
Text1.Text = "70" '1:10
Text2.Text = "90" '1:30
Timer1.Interval = 1000
WindowsMediaPlayer1.Controls.currentPosition = Text1.Text
WindowsMediaPlayer1.URL = "C:\myvideo.avi"
End Sub
Private Sub Timer1_Timer()
If WindowsMediaPlayer1.Controls.currentPosition >= Text2.Text Then
WindowsMediaPlayer1.Controls.stop
End If
End Sub
-
Oct 27th, 2009, 04:15 PM
#8
Thread Starter
Fanatic Member
Re: Windows Media Player Control
Thanks, thats exactly what I am looking for..Is there a way to seperate whats in the textbox? Lets say someone entered 1:10 is there a way to convert it over to 70 seconds?
-
Oct 27th, 2009, 04:47 PM
#9
Re: Windows Media Player Control
You can do something like this, assuming the video isn't longer than 1 hour.
MsgBox CDate("00:" & Text1.Text) * 86400
-
Oct 27th, 2009, 05:58 PM
#10
Thread Starter
Fanatic Member
Re: Windows Media Player Control
Ok, thanks but what if the video is longer than 1 hour?
-
Oct 29th, 2009, 06:25 PM
#11
Thread Starter
Fanatic Member
Re: Windows Media Player Control
Can the video be over an hour?
-
Oct 30th, 2009, 09:23 AM
#12
Re: Windows Media Player Control
Yes, simply remove the "00:".
MsgBox CDate(Text1.Text) * 86400
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|