我如何从 PowerBuilder 应用程序播放蜂鸣声?

how do i play beep sound from PowerBuilder app?

我需要我的 PowerBuilder 应用程序播放至少两秒钟的蜂鸣声。 这可以用 Win API 来完成吗?

来自 PowerBuilder 帮助:

Beep PowerScript function

Causes the computer to beep up to 10 times.

Syntax

Beep ( n )

n The number of times you want the computer to beep. If n is greater than 10, the computer beeps 10 times.

Return Values

Integer. Returns 1 if it succeeds and -1 if it fails. If n is null, Beep returns null. The return value usually is not used.

Examples

This statement causes the computer to beep five times:

Beep(5)