很簡單,給你點程式碼點工程-引用新增WindowsMediaPlayer控制元件將控制元件新增到窗體,然後寫入:Private Sub Form_Load()WindowsMediaPlayer1.url = "file:///" + Replace(app.path, "\", "/")+"/音樂檔名" "播放音樂檔案WindowsMediaPlayer1.settings.playCount = 2 "使音樂檔案迴圈播放End SubPrivate Sub Command1_Click()shell (app.path+"\綜合實踐報告.DOC") "按下Command1時開啟綜合實踐報告.DOCEnd SubPrivate Sub Command2_Click()shell (app.path+"\綜合實踐影片.WMV") "按下Command2時開啟綜合實踐影片.WMVEnd SubPrivate Sub Command3_Click()WindowsMediaPlayer1.url = "stop" "按下Command3時停止播放音樂End Sub
很簡單,給你點程式碼點工程-引用新增WindowsMediaPlayer控制元件將控制元件新增到窗體,然後寫入:Private Sub Form_Load()WindowsMediaPlayer1.url = "file:///" + Replace(app.path, "\", "/")+"/音樂檔名" "播放音樂檔案WindowsMediaPlayer1.settings.playCount = 2 "使音樂檔案迴圈播放End SubPrivate Sub Command1_Click()shell (app.path+"\綜合實踐報告.DOC") "按下Command1時開啟綜合實踐報告.DOCEnd SubPrivate Sub Command2_Click()shell (app.path+"\綜合實踐影片.WMV") "按下Command2時開啟綜合實踐影片.WMVEnd SubPrivate Sub Command3_Click()WindowsMediaPlayer1.url = "stop" "按下Command3時停止播放音樂End Sub