How to Add Background Music In VB.Net With Full Source Code

In this application you can learn how to add background music in your application, we making creativity application with 3d effects, while background sounds only adorn our applications specially. In VB.NET you can add background music within 5 minutes. Let’s try below points.


How to Make This simple Application using VB.Net:
  1. Open Microsoft Visual Studio
  2. Click File => New =>Project
  3. Select Visual Basic VB.NET, Windows Application
  4. Enter Your Project Name
  5. In the toolbox drag 2 buttons and change its text property start, stop
  6. Right Click my project (it’s placed on above of properties window) open Resources addexisting file
  7. Now choose any wav format song (ex- song.wav) and copy and paste this below code
Code:
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
My.Computer.Audio.Play(My.Resources._00CRazy_frog_00m_01s__00m_07s, AudioPlayMode.BackgroundLoop)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
My.Computer.Audio.Stop()
End Sub
End Class

1 comment:

  1. I’ve been searching for some decent stuff on the subject and haven't had any luck up until this point, You just got a new biggest fan!.. read

    ReplyDelete

Tags

Link list