How to make your own media player in visual studio 2010 and install it to others Desktops easily

By
A media player is a software application that is used to play audio ,video  and store the images. Window media player is a software to play the different media. This is developed by Microsoft Corporation. There are some favorite media players which is used in our general life as given below:-
     1.) iTunes :-  It is developed by Apple on January 2001 . Most iTunes users are iPod,iPhone and Apple OS.
     2.) VLC :- It is a Open Source Cross-platform media player. Today this media player is used mostly. It 's framework support to play media files as well as DVDs, Audio CDs, VCDs, and various streaming video and audio etc.
     3.) Windows Media Player :- It was developed by Microsoft.The first version of the Windows Media Player resease about in 1991, being compatible with Windows 3.0. 
     4.) Winamp :- It is media player for window based PCs and Android devices. It was released by Justin Frankel on April 21, 1997 .
     5.) Parole Media Player :- It is a media player for unix operating system .It plays local media files such as MP3 ,WAV and MPEG, as well as CDs and DVDs etc.
     6.) Media Monkey :-  It is high highly extensible via scripting. It is currently available in over 10 language.It's look and feel is highly customizable. It is also helpful to play the damage files. 
      Here we will learn"How to make your own media player in visual studio 2010 and install it to others Desktops easily ".

There are some steps to implement this whole concepts as given below:-
Step 1 :-  First open your visual studio 2010 or others-->File -->New--> Project -->Select WindowsFormApplication (Window_MediaPayer)  --> OK --> First Drag and drop OpenFileDialog and MenuStrip control on the form --> After that Create Your form menu items first as shown below:-
menustript

Step 2 :-  Now Right Click on Toolbox -->Choose Items... --> Now click COM Components  --> Select Window Media Player  --> OK as shown below :-


Step 3 :- Now Set this Window player on your form window  as shown below:-

Step 4 :-  Now First Double click on Open File and write the C# codes similarity write the C# codes for  Play , Pause , Resume ,Stop,Previous,Next , FastForward, FastReverse, Help and Exit button menu also as given below:-
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Window_MediaPlayer
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void openFileToolStripMenuItem_Click(object sender, EventArgs e)
        {
            openFileDialog1.ShowDialog();
        }

        private void axWindowsMediaPlayer1_Enter(object sender, EventArgs e)
        {
            axWindowsMediaPlayer1.URL = openFileDialog1.FileName;
        }

        private void playToolStripMenuItem_Click(object sender, EventArgs e)
        {
            axWindowsMediaPlayer1.URL = openFileDialog1.FileName;
        }

        private void pauseToolStripMenuItem_Click(object sender, EventArgs e)
        {
            axWindowsMediaPlayer1.Ctlcontrols.pause();

        }

        private void resumeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            axWindowsMediaPlayer1.Ctlcontrols.play();
        }

        private void stopToolStripMenuItem_Click(object sender, EventArgs e)
        {
            axWindowsMediaPlayer1.Ctlcontrols.stop();
        }

        private void PreviousToolStripMenuItem_Click(object sender, EventArgs e)
        {
            axWindowsMediaPlayer1.Ctlcontrols.previous();
        }

        private void nextToolStripMenuItem_Click(object sender, EventArgs e)
        {
            axWindowsMediaPlayer1.Ctlcontrols.next();
        }

        private void fastForwardToolStripMenuItem_Click(object sender, EventArgs e)
        {
            axWindowsMediaPlayer1.Ctlcontrols.fastForward();
        }

        private void fastReverseToolStripMenuItem_Click(object sender, EventArgs e)
        {
            axWindowsMediaPlayer1.Ctlcontrols.fastReverse();
        }

        private void helpToolStripMenuItem_Click(object sender, EventArgs e)
        {
            MessageBox.Show("You can solve your .net problems,Go Http://www.msdotnet.co.in/ ,Read and implement each concepts ");
        }

        private void exitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }
    }
}

Step 5 :- Now Run the Application (press F5) --> Now Go File --> Press Open File as shown below:-
Step 6 :- Now Choose Video or Audio files From Your Computer as shown below:-


Step 7:- Now Press Play Button --> You will see ,your file will be played in your player as shown below:-


Note :- After choose the file, you have to press play button as mentioned in step 7

How to create setup file for this application 
You can refer below link for create setup file
There are some steps to create setup file for this application,After that you can install it at any Desktops easily.

Step 1  :- First Right click on project --> Add --> New Project... as shown below:-
Step 2  :- After that choose visual studio installer --> Select Setup Wizard  --> Write your setup Name as(MY.NET TUTORIALS) --> OK as shown below:-
Step 3  :- After that Press Next Button --> Select Create a setup for a windows Application-->Press Next Button as show Below:-
;l

Step 4 :- After that Select Primary output From Window_MediaPlayer -->  Press  Next Button as show Below:-

Step 5  :- Now Press Add Button --> Go your project file where it resides in your computer 's drive --> Choose Exe file as shown below. My project path is :
C:\Users\RAMA SHANKAR\Documents\Visual Studio2010 \ Projects \ Window _ MediaPlayer 
SEE IT:-
Step 6  :- When you add your project file, a file path will be added in your wizard window --> after that press Next  -->Finish Button as shown below:-


Step 7  :-  Now First Press Application Folder --> Go right side window and Right click on that window --> Add --> File ... (here choose an icon file from your Desktop ) .

Step 8  :-  After that you will see, An icon file(.ico) will be add to your right side window --> Now Right click on Primary Output  file and create Shortcut file(You can choose Name your self for Shortcut file) , this name will be shown on your Desktop ,when you will install it .I have chosen Name MNT_Player for this Shortcut file.


Step 9  :- Now Right click on MNT_Player --> Properties Window -->Select Icon Dropdown list and click (Browse..) --> Now Again Browse --> Double click on Application Folder --> Select your Icon file(MNT.ico)  --> press OK .
SEE IT :-

Step 10  :- Now Drag and Drop MNT_Player on User's Desktop as shown below:-


Step 11  :- Now Repeat Step 8 and Step 9 again --> Now  Go left side window --> Create a new folder(setup file) in User's Programs Menu --> Drag and Drop MNT_Player on User's Programs Menu as shown below:-
setup menu


Step 12  :-  Open Solution Explorer -->Right click on MY.NET TUTORIALS File -->click  Build  as shown below :-
build

Step 13  :- Go below Path to see your setup file :-
C:\Users\RAMA SHANKAR\Documents\Visual Studio 2010 \ Projects \ Window _ MediaPlayer\MY.NET TUTORIALS\Debug
SEE IT:-
mysetup


Step 14  :- Now Run the Setup File  --> you will see that one icon will be created on your Desktop as shown below:-

Step 15  :-  Now Play media player --> Go File -->Open File--> Choose Your audio or video file from your computer--> After that Press Play Button --> you will see following  output as shown below:- 

Note :- This is working fine,if any problem you can ask me .
For More...
  1. How to build Real Form Filling Application like IBPS  
  2. How to make registration and login page in asp.net
  3. How to implement 3 tier architecture concepts in real life
  4. How to add .mdf file database in asp.net website
  5. Take Print receipt in Windows Form Application
  6.  File Handling Real Application
  7.  E-Post System Project
  8. Overview of C#
  9. Call by value and call by reference
  10. How to implement all Web Form controls in asp.net
  11. Data List Real Application
  12. Repeater control Real application
  13. How to use session in asp.net application
  14. How to use Navigation control in asp.net
  15. Interview Questions and Answers
  16. How to implement web services in asp.net application
  17. How to use WCF Services in asp.net application.
  18. Create captcha image without dll file in asp.net
You can download whole application and setup file from below link...
Download whole application                                                    Download Complete Setup File
         Download                                                                             Download

0 comments:

Post a Comment

Powered by Blogger.