Programming, website development forum Get latest updates by RSS Follow TechnicalTalk on Twitter Follow TechnicalTalk on Facebook 
HomeSearchRecent PostsLoginRegisterContact Us

Username  
Password    
  Forgot your password?  

Pages: [1]   Go Down
 
  Email this topic  |  Print
0 Members and 1 Guest are viewing this topic.

How to develop Media Player with C# .Net?

 
webmaster forum
Otev  Offline
Activity
0%
 
New Poster
Posts: 1
Topics: 1
January 11, 2009, 02:31:54 PM

Steps to Develop a Media Player with C#.NET?
« Last Edit: July 07, 2011, 10:21:17 AM by Admin »
 
webmaster forum
polas  Offline
Activity
33.33%
 
Code Guru
Gender: Male
Posts: 1399
Topics: 85
WWW
January 11, 2009, 03:50:40 PM

Can you provide us with more information as to what you want to achieve - what sort of media will you be aiming to support?

Mesham Type Oriented Parallel Programming Language, Free online technical support
 
webmaster forum
polas  Offline
Activity
33.33%
 
Code Guru
Gender: Male
Posts: 1399
Topics: 85
WWW
January 12, 2009, 07:25:55 AM

As sent in a PM to me

I need a stand alone software which can play music files and videos files, something like a window media player

Mesham Type Oriented Parallel Programming Language, Free online technical support
 
webmaster forum
Monalisa  Offline
Monalisa Parker
Activity
0%
 
New Coder
Location: UK
Gender: Female
Age: 26
Posts: 20
Topics: 3
March 08, 2009, 09:46:01 PM

    * Steps you will have to do.
    * Start visual studio and create a new window application project.
    * Set the following properties of Form by using properties windows.

Text = Media Player, BoarderStyle = FixedSingle, maximizeBox  = False, Size = 298,298

Now right click on the toolbar and from the menu choose “Add/Remove Items”. A dialog box will appear choose the “COM Component” tab. Search for windows media player and check it by clicking in the checkbox. Click ok. Now in your toolbox a new item is added with the name of window media player.

 

    * Drop this to your form and set the following properties.

Name = player, Size = 298,250

 

    * Drop a main menu control to build the menu for media player
    * Build the menu in the following hierarchy and set there names as shown in parenthesis.

File

   Open (open)

   Exit (mexit)

 

Player

    Play (play)

    Stop (mstop)

     Pause (mpause)

 

Volume

     Up   (mup)

     Down (mdown)

     Mute (mmute)

 

    * From toolbox drop a “OpenFileDialogBox” control to your form.
    * Set its name to “opd”.
    * Open the code window and write the code as below in your code window.

Private Sub open_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles open.Click

Try

   opd.InitialDirectory = "c:\"

   opd.ShowDialog()

   player.URL = opd.FileName

   player.Ctlcontrols.play()

 

Catch ex As Exception

  MessageBox.Show("Some error occur so can't play media", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)

 

End Try

 

End Sub

 

Private Sub mexit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mexit.Click

 

   Application.Exit()

 

End Sub

Private Sub play_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles play.Click

 

    player.Ctlcontrols.play()

 

End Sub

Private Sub mstop_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mstop.Click

 

        player.Ctlcontrols.stop()

 

End Sub

Private Sub mpause_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mpause.Click

 

    player.Ctlcontrols.pause()

 

End Sub

Private Sub mup_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mup.Click

 

        player.settings.volume = player.settings.volume + 10

 

End Sub

Private Sub mdown_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mdown.Click

 

        player.settings.volume = player.settings.volume - 10

 

End Sub

Private Sub mmute_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mmute.Click

 

If player.settings.volume = player.settings.mute() Then

 

   player.settings.volume = 20

 

Else

 

   player.settings.volume = player.settings.mute()

 

End If

 

End Sub

Watch PC TV
 
webmaster forum
Activity
100%
 
New Coder
Posts: 16
Topics: 0
WWW
January 28, 2012, 03:39:10 AM

Steps to Develop a Media Player with C#.NET?

Mobile Device Management
 
webmaster forum
Andrew26  Offline
Activity
100%
 
New Coder
Gender: Male
Age: 26
Posts: 15
Topics: 0
WWW
January 28, 2012, 04:36:47 AM

Check it out and try it. . :)

hxxp: www. codeproject. com/Articles/2632/DirectShow-MediaPlayer-in-C

Wholesale Sunglasses
 
webmaster forum
Ricky26  Offline
Activity
100%
 
New Coder
Posts: 15
Topics: 0
WWW
January 30, 2012, 05:18:23 AM

Thanx Andrew for this link. . .
its really help . . :)

eGo-C
 
  Email this topic  |  Print
Pages: [1]   Go Up
 
Jump to:  



Powered by SMF 1.1.15 | SMF © 2011, Simple Machines


Google visited last this page February 04, 2012, 11:04:38 AM