sound recorder vb net

How to record sound using VB.NET ? A voice recording project using mciSendString function in VB.NET

This is a simple voice recording project developed in VB.NET. It records the sound and then save the output file (.MP3) in local disk and then we can also play the recorded file through this project. mciSendString function is used in this project so you will also learn about mciSendString function. in this blog post.

DOWNLOAD FULL PROJECT (ZIP FILE)

mciSendString function sends a command string to an MCI device. The device that the command is sent to is specified in the command string.

Syntax :

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

Library :

winmm.dll

Parameters :

· lpszCommand
Address of a null-terminated string that specifies an MCI command string. For more information about the command strings, visit HERE

· lpszReturnString
Address of a buffer that receives return information. If no return information is needed, this parameter can be NULL.

· cchReturn
Size, in characters, of the return buffer specified by the lpszReturnString parameter.

· hwndCallback
Handle of a callback window if the “notify” flag was specified in the command string.

Source References – 1 , 2

If you have any query to ask or any idea to share then please comment below.

About Hrishabh sharma

Hrishabh Sharma is the founder of an IT firm "Chanakya IT Solutions" which offers a variety of software, website, mobile app solutions. He has more than 8 years of experience in software and web development.