modapi.bas

来自「有一点点类似真人快打的游戏。挺好玩的」· BAS 代码 · 共 28 行

BAS
28
字号
Attribute VB_Name = "modAPI"
' http://www.vbpro.net
' VBPro.Net中文资源网
' 「VB6.0中文专业版彻底研究」
' 帅帅阿柳提供

Option Explicit
' 侦测音效卡的API,请参考EX13-2的范例
Declare Function waveOutGetNumDevs Lib "winmm.dll" () As Long

' 定义矩形区域的自订变数
Type tRect
    Left As Long
    Top As Long
    Right As Long
    Bottom As Long
End Type

' 检查两块区域是否有交错的API
Declare Function IntersectRect Lib "user32" (lpDestRect As tRect, lpSrc1Rect As tRect, lpSrc2Rect As tRect) As Long

' 播放音效的API,请参考EX15-2的范例
Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

' 定义非同步播放的常数
Global Const SND_ASYNC = &H1

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?