|
-
October 4th, 2001, 01:24 AM
#1
Play Command (GW BASIC)
Any body familiar with QBASIC or GW BASIC may know about the Play command ?
Ie. a function requesting for 2 parameters viz : Frequency & Duration
Once this line get executed the sound corresponding to the Frequency specified, will be played by the system speaker.
Eg: Play (700, 20) ' this line will play the sound having 700 Hz for a period of 20 seconds
Is there a Similar function or any thing in VB (I am not interested in MIDI file players etc)
Srinika
If u don't know how to Rate an answer, then Rate my answer to learn, If u know, then practice it 
-
October 4th, 2001, 08:45 PM
#2
Re: Play Command (GW BASIC)
You can use Win32 function.
' declaration
private Declare Function Beep Lib "kernel32" (byval dwFreq as Long, _
byval dwDuration as Long) as Long
' button handler
private Sub Command1_Click()
Beep 700, 20000
End Sub
Duration is in milliseconds of course.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|