thx for the help.
Dim writer As StreamWriter = New StreamWriter("Doremi.mid")
Dim hexData(1000000) As String
For x = 0 To 3
If x = 0 Then
hexData(x) = "4D54686400000006000000010080"
ElseIf x = 1 Then
hexData(x) = "4D54726B0000002E"
ElseIf x = 2 Then
hexData(x) = "00C1180091376000903C6081003C00003E6081003E000040600091370000913960810090400000913900"
ElseIf x = 3 Then
hexData(x) = "00FF2F00"
End If
writer.Write(Frm.hex2ascii(hexData(x)))
Next
writer.Close()
Public Function hex2ascii(ByVal hextext As String) As String
Dim Panjang As Integer
Dim num, value As String
For Panjang = 1 To Len(hextext) Step 2
num = Mid(hextext, Panjang, 2)
value = value & Chr(Val("&h" & num))
'y += 1
Next
Return value
End Function
i make code using mci api but it can't work and system error say sistem overflow exception, arithmetic resulted in overflow, I don't know what's wrong.
Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim play As Integer
play = mciSendString("open C:\Windows\Media\flourish.mid type sequencer alias passport", 0, 0, 0)
play = mciSendString("play passport", 0, 0, 0)
End Sub
Edited by saint_xaver, 25 May 2010 - 10:42 PM.


Sign In
Create Account


Back to top









