Current location - Education and Training Encyclopedia - Education and training - VB player program can't find the DLL entry point beep in kernel32.
VB player program can't find the DLL entry point beep in kernel32.
Change the function name apibeep to beep.

Private declaration function beeplib "kernel32" alias "beep" (byval dwfreq is Long, ByVal dwDuration is Long) is Long.

Originally, I wanted to rename windows9x, because in order to prevent the conflict with Beep that comes with VB, the system that has played SP6 and XP or above in vb6 does not need to be renamed.

An example of a little music:

The private declaration function beeplib "kernel 32" (as long as byval dwfreq and as long as ByVal dwDuration) is the same length.

Private constant v_c = 220

Private subcommand 1_Click ()

Call beep (v_c, 500)

Call beep (v _ c * 2 (2/12), 500)

Call beep (v _ c * 2 (4/12), 500)

Call beep (v _ c * 2 (5/12), 500)

Call beep (v _ c * 2 (7/12), 500)

Call beep (v _ c * 2 (9/12), 500)

Call beep (v _ c * 2 (1112), 500)

Call Beep (v _ c * 2500)

End joint

This example passed the WindowsXP+VB6+SP6 test.