How to make a player with vs fast
This program environment:
System Windows7
Tool vs2012
Language C #
The steps are as follows:
1. Add WindowsMedia palyer Components
Open the View, toolbox
Right-click general, select items->com components->windows Media palyer
Create a new WinForm project and open the form to see the Windows Media Palyer component below the General Toolbox, as shown in:
2. Add WindowsMedia palyer, OpenFileDialog (the component is not visible but will appear below) in the form, MenuStrip (drag in) three components, and the Windows Media The Duck property of the palyer is set to fill (for padding to the right middle)
3. Add function
Click Open to add the following features
Openfiledialog1.showdialog ();
Axwindowsmediaplayer1.url = Openfiledialog1.filename;
Click Close to add the following features
This . Close ();
4. Running the program
Results such as:
Click Open, select the video file, and play the following effect:
At this point, made a simple player, when we need to play files in the program when it is possible to use their own player!
How to quickly make a player in C #