TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
krulz
NA
1
0
How to play WindowsMediaPlayer .
Apr 26 2007 12:47 AM
Hello everyone,
I want to open and stop the Video files in the WindowsMediaPlayer through Windows application. I am using a third party GUI software, so I wont be able to add WMPlayer control on to my application. I just need to control the WMPlayer by the code.
The below mentioned sample code is able to open the player and play the Video file. But the stop and close functionalities are not working in this.
Can U please tell me how to control the mediaplayer through code. I want to implement functionalities like 'Pause', 'Fullscreen' etc..
using
WMPLib;
namespace
Sample_MediaPlayer
{
public partial class Form1 : Form
{
private WindowsMediaPlayerClass wmPlayer = new WindowsMediaPlayerClass();
//private WindowsMediaPlayer wmPlayer = new WindowsMediaPlayer();
public Form1()
{
InitializeComponent();
}
private void Play_Click(object sender, EventArgs e)
{
wmPlayer.openPlayer(@"C:\SampleVideo.wmv");
}
private void Stop_Click(object sender, EventArgs e)
{
wmPlayer.close();
//wmPlayer.controls.stop();
}
}
}
- Thanks
Reply
Answers (
1
)
Send/Receive Data Online
how to transfer element from datagridview to treeview?