VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



MSDXM Controls/Chapters

by Quake (33 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Intermediate
Date Added: Fri 12th February 2021
Rating: (0 Votes)

MSDXM MediaPlayer (IMediaplayer) Controls.
This is to demonstrate how to use the various controls within the MSDXM
Mediaplayer. Subject may change upon discovery. Update1: Moved: Timer1 to
Playstatechange event Changed: hScoll change events causes skipping
playback. What's new? Demonstration on how to Draw Chapters for MSDXM
IMediaplayer control List2 Click correction Added: Skip Reverse/Forward
button Example

Rate MSDXM Controls/Chapters

'*********************************************
' IMPORTANT
' SendOpenStateChange must be ENABLED!
' SendPlayerStateChange must be ENABLED!
' Context Menu
' If you use the Context menu and you are using Owner Drawn buttons
' Detection
' Detect what the Mediaplayer is doing within the Context Menu
' ----------------------------------------------
' First we will detect the Play/Pause
' ----------------------------------------------
' Some Case Select are MARKED to what is known
' FORMOTHER = Child Form not of the Video Form
' Create a Owner Drawn Button/Checkbox Name: Checkbox1
' Change MP1 to you Mediaplayer1 Control name
Private Sub MP1_PlayStateChange(ByVal OldState As Long, ByVal NewState As Long)
On Error GoTo Err_Proc ' Not needed - Just incase
 Select Case NewState
 Case 0 ' Stop
 Debug.Print "Stopped"
 FORMOTHER.Checkbox1.Value = 0
 FORMOTHER.Checkbox1.Caption = "Stopped"
 Case 1 ' Paused
 Debug.Print "Paused"
 FORMOTHER.Checkbox1.Value = 1
 FORMOTHER.Checkbox1.Caption = "Paused"
 Case 2 ' Playing
 Debug.Print "Playing"
 FORMOTHER.Checkbox1.Value = 0
 FORMOTHER.Checkbox1.Caption = "Playing"
 Case Else:
 Debug.Print NewState, "Else"
 Debug.Print "Case Else is Only here to see other Fired Controls"
 End Select
Exit sub
Err_Proc:
 Select Case Err.Number
 Case 0:
 Case Else:
 MsgBox Err.Number & " " & Err.Description
 End Select
End Sub
' That was only to demonstrate the Menu Play/Pause

Download this snippet    Add to My Saved Code

MSDXM Controls/Chapters Comments

No comments have been posted about MSDXM Controls/Chapters. Why not be the first to post a comment about MSDXM Controls/Chapters.

Post your comment

Subject:
Message:
0/1000 characters