📄 apicalls.bas
字号:
Attribute VB_Name = "Module3"
Option Explicit
Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long
Public Const SND_ALIAS = &H10000 'lpszName is a string identifying the name of the system event sound to play.
Public Const SND_ALIAS_ID = &H110000 'lpszName is a string identifying the name of the predefined sound identifier to play.
Public Const SND_APPLICATION = &H80 'lpszName is a string identifying the application-specific event association sound to play.
Public Const SND_ASYNC = &H1 'Play the sound asynchronously -- return immediately after beginning to play the sound and have it play in the background.
Public Const SND_FILENAME = &H20000 'lpszName is a string identifying the filename of the .wav file to play.
Public Const SND_LOOP = &H8 'Continue looping the sound until this function is called again ordering the looped playback to stop. SND_ASYNC must also be specified.
Public Const SND_MEMORY = &H4 'lpszName is a numeric pointer refering to the memory address of the image of the waveform sound loaded into RAM.
Public Const SND_NODEFAULT = &H2 'If the specified sound cannot be found, terminate the function with failure instead of playing the SystemDefault sound. If this flag is not specified, the SystemDefault sound will play if the specified sound cannot be located and the function will return with success.
Public Const SND_NOSTOP = &H10 'If a sound is already playing, do not prematurely stop that sound from playing and instead return with failure. If this flag is not specified, the playing sound will be terminated and the sound specified by the function will play instead.
Public Const SND_NOWAIT = &H2000 'If a sound is already playing, do not wait for the currently playing sound to stop and instead return with failure.
Public Const SND_PURGE = &H40 'Stop playback of any waveform sound. lpszName must be an empty string.
Public Const SND_RESOURCE = &H4004 'lpszName is the numeric resource identifier of the sound stored in an application. hModule must be specified as that application's module handle.
Public Const SND_SYNC = &H0 'Play the sound synchronously -- do not return until the sound has finished playing.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -