السلام عليكم
انا عضوه جديده لديكم واتمنى استفيد منكم وافيدكم :)
مشكلتي انني جديده في البرمجه بالـ vb مااوده منكم مساعدتي
فانا اريد انا ان اقرا ملف من نوع wave بهذه اللغه
ووجدت الكلاس المناسب(يوضع في المودل) وهو كالتالي
Option Explicit 'Wave file format info Public Type WAVETYPE strHead As String * 12 strFormatID As String * 4 lngChunkSize As Long intFormat As Integer intChannels As Integer lngSamplesPerSec As Long lngAvgBytesPerSec As Long intBlockAlign As Integer intBitsPerSample As Integer End Type Global gudtHeader As WAVETYPE Global glngChunkSize As Long Global gbytData() As Byte Sub ExtractWaveData(strFileName As String, lngOffset As Long) Dim intWAVFile As Integer Dim i As Long Dim strTemp As String * 4 Dim blnFound As Boolean 'Open the wave intWAVFile = FreeFile() Open strFileName For Binary Access Read Lock Write As intWAVFile 'Get the header info Get intWAVFile, lngOffset, gudtHeader 'Find the "data" portion of the file For i = lngOffset To LOF(intWAVFile) Get intWAVFile, i, strTemp If strTemp = "data" Then blnFound = True Exit For End If Next i 'Ensure this is a wave file If blnFound = False Then MsgBox "Invalid wave data.", vbCritical, "Invalid Wave" Close intWAVFile Exit Sub End If 'Get the data information Get intWAVFile, , glngChunkSize ReDim gbytData(glngChunkSize) Get intWAVFile, , gbytData Close intWAVFile End Sub
هنا في الكود فنكشن تعمل على قراه الملف لكن لم استطع الاستفاده منها
فاريد صيغه امر فتح الملفات وكيف اتعامل معها :rolleyes:
وشاكره لكم حسن تعاونكم :)
وكل عام وانتم بخير :)