7) “BtEnd按钮”MouseHover事件代码
If TipsFlag = True Then
ToolTip1.SetToolTip(BtStart, "左键设置开始点,右键取消设置")
Else
ToolTip1.SetToolTip(BtStart, "")
End If
(10)菜单核心代码
“打开语音文件”菜单代码:
Private Sub 打开语音文件ToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 打开语音文件ToolStripMenuItem1.Click
Dim FilePath As String
' OpenFileDialog1.ShowDialog()
With Me.OpenFileDialog1
.Title = "打开语音文件"
.CheckFileExists = True
.CheckPathExists = True
.Multiselect = False
.Filter = "mp3文件(*.mp3)|*.mp3|wma文件(*.wma)|*.wma"
' OpenFileDialog1.Title = "打开语音文件"
' OpenFileDialog1.CheckFileExists = True
' OpenFileDialog1.CheckPathExists = True
' OpenFileDialog1.Multiselect = False
' OpenFileDialog1.Filter = "mp3文件(*.mp3)|*.mp3|wma文件(*.wma)|*.wma"
If .ShowDialog() = Windows.Forms.DialogResult.Cancel Then
Exit Sub
End If
FilePath = .FileName
End With
Me.Text = FilePath
AxWindowsMediaPlayer1.URL = FilePath
'设置播放模式 AxWindowsMediaPlayer1 .
Try
AxWindowsMediaPlayer1.Ctlcontrols.play()
Catch ex As Exception
|