Dim RefInt As Long
Dim OnOff As String
SetWindowShow = False
If WindowOff Then OnOff = "show" Else OnOff = "hide"
RefInt = mciSendString("window NOWMUSIC state " & OnOff, vbNull, 0, 0)
If RefInt = 0 Then SetWindowShow = True
End Function
''''====================================================
''''获得当前媒体的状态是不是在播放
''''====================================================
Public Function IsPlaying() As Boolean
Dim sl As String * 255
mciSendString "status NOWMUSIC mode", sl, Len(sl), 0
If Left(sl, 7) = "playing" Or Left(sl, 2) = "播放" Then
IsPlaying = True
Else
IsPlaying = False
End If
End Function
''''====================================================
''''获得播放窗口的handle
''''====================================================
Public Function GetWindowHandle() As Long
Dim RefStr As String * 160
mciSendString "status NOWMUSIC window handle", RefStr, 80, 0
GetWindowHandle = Val(RefStr)
End Function
''''====================================================
''''获取DeviceID
''''====================================================
Public Function GetDeviceID() As Long
GetDeviceID = mciGetDeviceID("NOWMUSIC")
End Function
文章整理:西部数码--专业提供域名注册、虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!




