分类：电脑/网络-程序设计
问题：用vb怎样编写多媒体播放器啊？ 
回答：本例了一个多媒体播放器，它能够播放WAV、MIDI和AVI文件。Private Sub Check2_Click()    If Check2.Value = 1 Then        '关闭AVI文件的声音        MMControl1.Silent = True    Else        '打开AVI文件的声音        MMControl1.Silent = False    End IfEnd SubPrivate Sub ComClose_Click()    MMControl1.Command = "close"End SubPrivate Sub ComPlay_Click()    MMControl1.Command = "close"    DiaOpen.Filter = "Wav文件|*.wav|MIDI文件|*.mid|AVI文件|*.avi"    DiaOpen.ShowOpen    MMControl1.FileName = DiaOpen.FileName    MMControl1.Command = "open"    MMControl1.Command = "play"    LabFile.Caption = DiaOpen.FileNameEnd SubPrivate Sub Form_Load()    '初始化    MMControl1.Visible = False    MMControl1.Notify = True    MMControl1.Shareable = False    MMControl1.TimeFormat = 0End SubPrivate Sub Form_Unload(Cancel As Integer)    MMControl1.Command = "close"End SubPrivate Sub MMControl1_StatusUpdate()    '计算文件总长度，单位为秒    LabLen.Caption = MMControl1.Length / 1000    '动态显示当前的播放位置    LabPlay.Caption = MMControl1.Position / 1000End SubPrivate Sub MMControl1_Done(NotifyCode As Integer)    '如果文件播放结束    If MMControl1.Position = MMControl1.Length Then        '倒回止文件的起点        MMControl1.Command = "prev"        '如果选择了自动重复播放        If Check1.Value = 1 Then            MMControl1.Command = "play"        End If    End IfEnd Sub