Public Function mciSetVolume(Channel As String, VolValue As Long, sAlias As String) Dim cmdToDo As String Dim dwReturn As Long
If LCase(Channel) = "left" Or LCase(Channel) = "right" Then cmdToDo = "setaudio " & sAlias & " " & Channel & " Volume to " & CStr(VolValue * 10) Else cmdToDo = "setaudio " & sAlias & " Volume to " & CStr(VolValue * 10) End If dwReturn = mciSendString(cmdToDo, 0&, 0&, 0&) End Function
Public Function mciGetVolume(Channel As String, sAlias As String) As Long Dim dwReturn As Long Dim Volume As String * 128 Dim cmdToDo As String
If LCase(Channel) = "left" Or LCase(Channel) = "right" Then cmdToDo = "status " & sAlias & " " & Channel & " Volume" Else cmdToDo = "status " & sAlias & " Volume" End If dwReturn = mciSendString(cmdToDo, Volume, 128, 0&) mciGetVolume = Val(Volume / 10) End Function
//>Rune
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.