The following is a sample of the command that I used
-----------------
Private Sub Bashe1_Click()
Picture1.Visible = True
MediaPlayer1.Visible = True
MediaPlayer1.open App.Path & "\audio\Aa\Bashe.wma"
End Sub
------------------
Printable View
The following is a sample of the command that I used
-----------------
Private Sub Bashe1_Click()
Picture1.Visible = True
MediaPlayer1.Visible = True
MediaPlayer1.open App.Path & "\audio\Aa\Bashe.wma"
End Sub
------------------
The following is a sample of the command that I used
-----------------
Private Sub Bashe1_Click()
Picture1.Visible = True
MediaPlayer1.Visible = True
MediaPlayer1.open App.Path & "\audio\Aa\Bashe.wma"
End Sub
------------------
I would try switching the sub to something like this.VB Code:
Private Sub Bashe1_Click() Dim strFilePath As String If Right(App.Path, 1) = "\" Then strFilePath = App.Path Else strFilePath = App.Path & "\" End If Picture1.Visible = True MediaPlayer1.Visible = True MediaPlayer1.open strFilePath & "audio\Aa\Bashe.wma" End Sub
Thank you for your help...
Your code gives an a compile error "Expected arry"
On what line?
"Expected arry"?Quote:
Originally posted by sanfoor200
Your code gives an a compile error "Expected arry"
It gives the error in the following line
If Right(App.Path, 1) = "\" Then
I'm clueless. I don't see why that would be throwing an error.
Hi sanfoor200
Which version of vb are you using ??
VB 6.0
When the program breaks, go to the IMMEDIATE window and type in
? App.Path
What does it output?
Lord_Rat :
I'm talking about the compiled program....the project works fine before and after the compile when I run it from the HardDisk...but the problem is when I burn it on the CD...it gives me the error..
Try adding a command button to your main form and on the click event put a message box that displays App.Path. VB sometimes uses UNC addressing instead of drive letters. It also may not recognize the CD drive letter... Give it a try.
I did it .. it recognize the CD drive...but it looks it does not recognize the sub-firectories or folders where wave files are located? It recongizes the them when I run the program from the HardDisk... strange !!!
When you run the program from the ROOT directory either C:\ D:\ or whateve, app.path returns [DriveLetter]:\..............if you run your program from a directory inside the root say for example c:\Temp....app.path does not return the slash at the end
thats why it dont work
Thats right...it retains the name of directory without the slash at the end... like c:\bashes ... how I can overcome this problem ?