Date: 02-16-2022
Return to Index
created by gbSnippets
'Compilable Example: (Jose Includes)
#Compiler PBWin 10
#Compile Exe
#Dim All
#Include "Win32API.inc"
#Resource Wave, noise, "erase.wav"
%IDC_Button = 500
Global hDlg As Dword
Function PBMain() As Long
Dialog New Pixels, 0, "PowerBASIC",300,300,200,200, %WS_OverlappedWindow To hDlg
Control Add Button, hDlg, %IDC_Button,"Play", 50,10,100,20
Dialog Show Modal hDlg Call DlgProc
End Function
CallBack Function DlgProc() As Long
Select Case Cb.Msg
Case %WM_Command
Select Case Cb.Ctl
Case %IDC_Button
PlaySound "noise", GetModuleHandle(ByVal 0), %SND_Resource Or %SND_Async
End Select
End Select
End Function
'gbs_01360
'Date: 05-11-2013
http://www.garybeene.com/sw/gbsnippets.htm