hi, i have a question regarding playing audio file using vb 2005. Here is my working code:

Dim dlgFileDialog As New OpenFileDialog

        dlgFileDialog.FileName = "C:\Documents and Settings\wek060049\Desktop\MusicAppreciation\Resources\1.mp3"
        Me.AxWindowsMediaPlayer1.URL = dlgFileDialog.FileName

it is working perfectly, i am wondering if i build an installation file from my project will it still working since i am using the path for the location of audio file. If the answer is not, any solution to solve this problem?

usually strings like what you show paths, connection strings,... saved in .config files that's a solution... but I'll give you another solution is to use relative path without refering to long path as u did simply if you need to tell your application you'll find the audio file besides the .exe so the path is "\\1.mp3"

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.