Click here to Skip to main content
15,881,852 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
when i will try to rhis code this file is run in debug mode but when i run this project it is not working

AxMediaplayer1.FileName = Application.StartupPath + "FNAME.wav";
application.DoEvents()
Posted

1 solution

you need to put "\\" after Application.StartupPath and then need to write filename.extension
axWindowsMediaPlayer1.URL = Application.StartupPath + "\\FNAME.wav";
 
Share this answer
 
Comments
ambarishtv 17-May-11 5:44am    
5 :)
Chitranjan Pd Asthana 17-May-11 5:51am    
i am also try to this code but problem is this file run in debug mode but not run in project
AxMediaplayer1.FileName = Application.StartupPath + "\\FNAME.wav";
application.DoEvents() .

axmediaplayer is not support .url properties
RaviRanjanKr 17-May-11 5:58am    
Its working in project too.
I am using axWindowsMediaPlayer1 of AxWMPLib namespace. and its supporting url properties. infact its not supporting FileName properties.
please check it again and feel free to revert back. :)
Chitranjan Pd Asthana 17-May-11 7:27am    
its have no property for play
Chitranjan Pd Asthana 17-May-11 7:46am    
it is very fast and play only last file in my playlist

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900