This repository has been archived on 2022-10-01. You can view files and clone it, but cannot push or open issues or pull requests.
Royalty-and-Presidency-Simu.../Presidency Simulator 2013/MusicPlayer.vb

22 lines
1 KiB
VB.net
Raw Normal View History

2017-04-14 07:50:05 +00:00
Public Class MusicPlayer
Public Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Integer, ByVal hwndCallback As Integer) As Integer
Dim musicAlias As String
Dim musicPath As String
Dim Track As Integer
Sub PlayRuleBritannia()
My.Computer.Audio.Stop()
My.Computer.Audio.Play(My.Resources.battle_hymn_of_the_republic, AudioPlayMode.BackgroundLoop)
End Sub
Sub PlayGodSavetheKing()
My.Computer.Audio.Stop()
My.Computer.Audio.Play(My.Resources.Mormon_Tabernacle_Choir___The_Star_Spangled_Banner, AudioPlayMode.BackgroundLoop)
End Sub
Sub PlayAbdication()
My.Computer.Audio.Play(My.Resources.AutoDestructSequenceArmed, AudioPlayMode.WaitToComplete)
PlayGodSavetheKing()
End Sub
Sub PlayDeath()
My.Computer.Audio.Stop()
My.Computer.Audio.Play(My.Resources.taps, AudioPlayMode.BackgroundLoop)
End Sub
End Class