I'm using the Beep function in kernel32.

Public Declare Function Beep Lib "kernel32" _
(ByVal dwFreq As Long, ByVal dwDuration As Long) As Long

I use the code Beep 1000, 1000

But the problem is I want the beep to be continuous until a command button is pressed and the beep stops. How do I use the beep function to do this?