Problems with music. - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Problems with music.

zakoschriszakoschris Posts: 3Member
edited November 2013 in Visual Basic
Hello, I'am trying to find out how to make a visual studio program play music on start up. I also would like to add a little check box that pauses the music. Any kind of information would be great! I'am almost finished with my program. Google has been no help to me. I think google hates me.

EDIT: I figured it out, However because the buttons on my program make noise the music stops when the button make a noise, Is there any way to fix this?

This was my post from another forum but nobody was willing to help me.

Here is the source:

[code]Public Class Form1

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Shell("Minecraft.exe")
End Sub

Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
Shell("TechnicLauncher.exe")

End Sub

Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
Shell("MC SOUNDS.exe")
End Sub

Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
Shell("mcedit.exe")
End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

Process.Start(Environment.ExpandEnvironmentVariables("%appdata%.minecraft exturepacks"))

End Sub

Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
Shell("Minecraft_Server.exe")
End Sub

Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click
Shell("SkinTheft.exe")
End Sub

Private Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click
Shell("Launch.bat")
End Sub

Private Sub Button9_Click(sender As Object, e As EventArgs)

End Sub

Private Sub Button1_Click_1(sender As Object, e As EventArgs) Handles Button1.MouseEnter

My.Computer.Audio.Play(My.Resources.losticks1, AudioPlayMode.Background)
End Sub

Private Sub Button3_Click_3(sender As Object, e As EventArgs) Handles Button3.MouseEnter

My.Computer.Audio.Play(My.Resources.losticks1, AudioPlayMode.Background)
End Sub

Private Sub Button2_Click_2(sender As Object, e As EventArgs) Handles Button2.MouseEnter

My.Computer.Audio.Play(My.Resources.losticks1, AudioPlayMode.Background)
End Sub

Private Sub Button4_Click_4(sender As Object, e As EventArgs) Handles Button4.MouseEnter

My.Computer.Audio.Play(My.Resources.losticks1, AudioPlayMode.Background)
End Sub
Private Sub Button5_Click_5(sender As Object, e As EventArgs) Handles Button5.MouseEnter

My.Computer.Audio.Play(My.Resources.losticks1, AudioPlayMode.Background)
End Sub
Private Sub Button6_Click_6(sender As Object, e As EventArgs) Handles Button6.MouseEnter

My.Computer.Audio.Play(My.Resources.losticks1, AudioPlayMode.Background)
End Sub
Private Sub Button7_Click_7(sender As Object, e As EventArgs) Handles Button7.MouseEnter

My.Computer.Audio.Play(My.Resources.losticks1, AudioPlayMode.Background)
End Sub
Private Sub Button8_Click_8(sender As Object, e As EventArgs) Handles Button8.MouseEnter

My.Computer.Audio.Play(My.Resources.losticks1, AudioPlayMode.Background)
End Sub

Private Sub Label1_Click(sender As Object, e As EventArgs)

End Sub

Private Sub LinkLabel1_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked

Try
System.Diagnostics.Process.Start("http://www.planetminecraft.com/member/zakoschris/")
Catch
'Code to handle the error.
End Try
End Sub

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
My.Computer.Audio.Play(My.Resources.Knob, AudioPlayMode.BackgroundLoop)

End Sub
End Class [/code]
Sign In or Register to comment.