How to quickly make a player in C #

Source: Internet
Author: User

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 #

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.