|
-
May 12th, 2002, 10:38 AM
#1
Thread Starter
Lively Member
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
------------------
-
May 12th, 2002, 10:44 AM
#2
Thread Starter
Lively Member
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
------------------
-
May 12th, 2002, 11:01 AM
#3
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
-
May 12th, 2002, 11:30 AM
#4
Thread Starter
Lively Member
Thank you for your help...
Your code gives an a compile error "Expected arry"
-
May 12th, 2002, 11:34 AM
#5
-
May 12th, 2002, 11:43 AM
#6
Hyperactive Member
Originally posted by sanfoor200
Your code gives an a compile error "Expected arry"
"Expected arry"?
-
May 12th, 2002, 12:06 PM
#7
Thread Starter
Lively Member
It gives the error in the following line
If Right(App.Path, 1) = "\" Then
-
May 12th, 2002, 12:10 PM
#8
I'm clueless. I don't see why that would be throwing an error.
-
May 12th, 2002, 01:06 PM
#9
Addicted Member
Hi sanfoor200
Which version of vb are you using ??
-
May 12th, 2002, 01:42 PM
#10
Thread Starter
Lively Member
-
May 12th, 2002, 01:44 PM
#11
When the program breaks, go to the IMMEDIATE window and type in
? App.Path
What does it output?
Need to re-register ASP.NET?
C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i
(Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)
-
May 12th, 2002, 03:33 PM
#12
Thread Starter
Lively Member
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..
-
May 12th, 2002, 05:36 PM
#13
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.
-
May 14th, 2002, 06:54 AM
#14
Thread Starter
Lively Member
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 !!!
-
May 14th, 2002, 07:03 AM
#15
Frenzied Member
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
-
May 14th, 2002, 07:14 AM
#16
Thread Starter
Lively Member
Thats right...it retains the name of directory without the slash at the end... like c:\bashes ... how I can overcome this problem ?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|