-
Nov 15th, 2012, 07:59 PM
#1
Thread Starter
Member
[RESOLVED] WMP progress bar
hi guys! how can i make a progress bar that corresponds to a video length and has a seeking function? for example is the progress bar of WMP. can u give me some starting point guys. thanks! any advice will be greatly appreciated.
-
Nov 16th, 2012, 12:40 AM
#2
-
Nov 16th, 2012, 10:36 AM
#3
Re: WMP progress bar
Don't really know why you want a progress bar, the WMP comes with one. But:
Set min of your progressbar to 0, and max to WindowsMediaPlayer1.currentMedia.duration
use a timer with interval set at, say 500 (1/2 second) (intially enabled = false
when you start your player, set the timer.enabled to true and move your progressbar with the WindowsMediaPlayer1.controls.currentPosition
-
Nov 16th, 2012, 12:56 PM
#4
Re: WMP progress bar
IF you have trouble setting the progress max value to the duration (see above), use this code: (where WMP1 is MY control)
Dim oMedia As IWMPMedia
Set oMedia = WMP1.newMedia(Text1.Text)
Dim dDummy As Double
Dim dDuration As Double
dDummy = oMedia.duration
WMP1.currentMedia = oMedia
dDuration = WMP1.currentMedia.duration
WMP1.URL = Text1.Text
ProgressBar1.Min = 0
ProgressBar1.Max = dDuration
-
Nov 16th, 2012, 09:17 PM
#5
Thread Starter
Member
Re: WMP progress bar
thanks guys for the ideas! it greatly helped me. BTW i did it by getting the total secs of the video and set it as the max value of the progress bar. that do the trick for me. just saying if ever someone might need help about this thing. cheers!
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
|