InteropServices and Beep

TwoWing

Well-known member
Joined
Jan 6, 2006
Messages
71
Location
Near Portsmouth, England
Programming Experience
Beginner
Hello. I got a short program today in using the following code at the top:-
VB.NET:
Imports System.Runtime.InteropServices
Public Class frmKeyboard
<DllImport("KERNEL32.DLL")> _
Public Shared Sub Beep(ByVal freq As Integer, ByVal dur As Integer)
End Sub

In Private Subs the following code is used to produce a sound:
VB.NET:
Beep(261,150)
Obviously the '261' has different values!
I have searched the sound system of my computer.
The sound produced is not very high - is there a way to amplify it?
Thank You.
 
Back
Top