📄 sndplaysoundfrommemory.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "资源文件范例程序"
ClientHeight = 4395
ClientLeft = 60
ClientTop = 345
ClientWidth = 5670
LinkTopic = "Form1"
ScaleHeight = 4395
ScaleWidth = 5670
StartUpPosition = 3 'Windows Default
Begin VB.Timer Timer1
Enabled = 0 'False
Interval = 100
Left = 240
Top = 1920
End
Begin VB.CommandButton Command3
Caption = "载入声音"
Height = 375
Left = 120
TabIndex = 4
Top = 2520
Width = 1095
End
Begin VB.CommandButton Command2
Caption = "载入图文件"
Height = 375
Left = 120
TabIndex = 3
Top = 1440
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "载入文字"
Height = 375
Left = 120
TabIndex = 2
Top = 120
Width = 1095
End
Begin VB.TextBox Text2
Height = 855
Left = 1320
MultiLine = -1 'True
TabIndex = 1
Top = 480
Width = 4095
End
Begin VB.TextBox Text1
Height = 270
Left = 1320
TabIndex = 0
Top = 120
Width = 4095
End
Begin VB.Image Image1
Height = 615
Left = 1320
Top = 1440
Width = 615
End
Begin VB.Image Image2
Height = 2760
Left = 2040
Top = 1440
Width = 3405
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Label1_Click()
End Sub
Private Sub Command1_Click()
Text1.Text = LoadResString(8001)
Text2.Text = LoadResString(8002)
End Sub
Private Sub Command2_Click()
Set Me.Icon = LoadResPicture("earth", vbResIcon)
Set Me.MouseIcon = LoadResPicture("bigpoint", vbResCursor)
Me.MousePointer = vbCustom
Set Image2.Picture = LoadResPicture("wanglogo", vbResBitmap)
Timer1.Enabled = True
End Sub
Private Sub Command3_Click()
Dim bArr() As Byte
bArr = LoadResData("Tada", "WAVE")
sndPlaySoundFromMemory bArr(0), SND_MEMORY Or SND_ASYNC
End Sub
Private Sub Timer1_Timer()
Static idx As Integer
idx = idx + 1
Set Image1.Picture = LoadResPicture("moon0" & idx, vbResIcon)
If idx = 8 Then idx = 0
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -