VB6 Example090-MMControl控件播放多媒体文件
代码如下:Dimm_FilenameAsStringPrivateSubCommand_Open_Click()Me.CommonDialog1.ShowOpenm_Fi...
代码如下:
Dim m_Filename As String
Private Sub Command_Open_Click()
Me.CommonDialog1.ShowOpen
m_Filename = Me.CommonDialog1.FileName
If m_Filename <> "" Then
Me.MMControl1.FileName = m_Filename
Me.Caption = m_Filename
Me.MMControl1.Command = "Open"
End If
End Sub
Private Sub Command_Play_Click()
Me.MMControl1.Command = "Play"
End Sub
Private Sub Form_Load()
m_Filename = ""
Me.MMControl1.AutoEnable = True
Me.MMControl1.hWndDisplay = Me.hWnd
End Sub
Private Sub MMControl1_StatusUpdate()
Me.HScroll1.Max = Me.MMControl1.Length
Me.HScroll1.Min = 0
Me.HScroll1.Value = Me.MMControl1.Position
End Sub
加载MP3时显示溢出,Me.HScroll1.Max 最大只有32767 而Me.MMControl1.Length 大得多
如何用水平滚动条作为进度条 展开
Dim m_Filename As String
Private Sub Command_Open_Click()
Me.CommonDialog1.ShowOpen
m_Filename = Me.CommonDialog1.FileName
If m_Filename <> "" Then
Me.MMControl1.FileName = m_Filename
Me.Caption = m_Filename
Me.MMControl1.Command = "Open"
End If
End Sub
Private Sub Command_Play_Click()
Me.MMControl1.Command = "Play"
End Sub
Private Sub Form_Load()
m_Filename = ""
Me.MMControl1.AutoEnable = True
Me.MMControl1.hWndDisplay = Me.hWnd
End Sub
Private Sub MMControl1_StatusUpdate()
Me.HScroll1.Max = Me.MMControl1.Length
Me.HScroll1.Min = 0
Me.HScroll1.Value = Me.MMControl1.Position
End Sub
加载MP3时显示溢出,Me.HScroll1.Max 最大只有32767 而Me.MMControl1.Length 大得多
如何用水平滚动条作为进度条 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询