|
下面用ShellExecute调用Windows Media Player 播放mp3的方法
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
'lpOperation可用参数:open、print、find、explore、edit
'nShowCmd参数 窗口模式类型声明
Private Const SW_HIDE = 0
Private Const SW_SHOWNORMAL = 1
Private Const SW_SHOWMINIMIZED = 2
Private Const SW_SHOWMAXIMIZED = 3
Private Const SW_SHOWNOACTIVATE = 4
Private Const SW_SHOW = 5
Private Const SW_MINIMIZE = 6
Private Const SW_SHOWMINNOACTIVE = 7
Private Const SW_SHOWNA = 8
Private Const SW_RESTORE = 9
Private Sub Command0_Click()
ShellExecute Me.hwnd, "open", "dj-我说我爱你dj版.mp3", "", "D:\KUGOO", SW_HIDE
End Sub |
|