View Poll Results: Was it usefull?

Voters
17. This poll is closed
  • Yes!

    6 35.29%
  • No!

    5 29.41%
  • No, It did not work!

    0 0%
  • Yes, Make more!

    2 11.76%
  • None of the above.

    4 23.53%
Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Jerry12358's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    gdg
    Posts
    28
    Reputation
    10
    Thanks
    16
    My Mood
    Drunk

    Smile [TUT] How to make your own Media Player!

    Hello everyone, Jerry here. Today I am going to show you how to make your own media player.

    The media player can do the following things:
    ~Play Music
    ~Play Videos
    ~Play media
    ~Rewind
    ~Play
    ~Pause
    ~(All media options)...

    I used Visual Basic 2008 express edition.

    Make sure that you name everything the same as I name, or it won't work!


    What you need:
    ~A form
    ~Main Menu
    ~opd
    ~Windows media player preset

    Don't worry, I will explain how to get all of those later on.

    1.) Start of by giving your form the following properties:

    Text = Media Player
    Show Icon = False
    Maximize box = False
    Form Border Style = FixedSingle
    Auto scale mode = Font
    Size = 822; 587

    2.) Once you've done that, we need to add our player. You can to that by doing the following:


    1. Right click on any tool in your toolbox.
    2. Click on 'Choose Items' (May take a while to load...)
    3. Click on the 'COM Components' tab.
    4. Search for 'Windows Media Player', and check the checkbox.
    5. Hit Ok.

    3.) Now go to your Toolbox and drag the new tool we added (Windows Media Player) into your form.

    4.) Give it the following properties:

    Name = player
    Size = 815; 539

    5.)Ok! We have finished adding our player. Now we need to add a Main Menu. You can do that by:

    Go to your toolbox and search for something called 'MainMenu'. If you don't have it, than do the same thing to add it as we did with the Media Player.

    In the first row you add and name:

    -File (Name = 'file')
    -Player (Name = 'MenuItem1')
    -Volume (Name = 'MenuItem2')

    Now it should pretty much look like this:

    [IMG]https://i655.photobucke*****m/albums/uu276/j3r0x_2009/tut1.jpg[/IMG]

    1. In the File row you add and name:

    -Open (Name = Open)
    -Exit (Name = mexit)

    2. In the Player row you add and name:

    -Play (Name = play)
    -Stop (Name = mstop)
    -Pause (Name = mpause)

    3. And at last, in the Volume row you add and name:

    -Up (Name = mup)
    -Down (Name = mdown)
    -Mute (Name = mmute)

    So it should look like this:

    [IMG]https://i655.photobucke*****m/albums/uu276/j3r0x_2009/tut2.jpg[/IMG]

    6.) Now we need one more thing before we start on the coding. This thing will open your media up.

    1. Go to your tool box and search for 'Open File Dialog.'
    2. Drag it into your Form, and you are finished.

    7.) Hehe! We are finished with that. But our Media Player does not do anything yet!! Here comes the Coding :

    Open function code:
    Try
    opd.InitialDirectory = "c:\"
    opd.ShowDialog()
    player.URL = opd.FileName
    player.Ctlcontrols.play()
    Catch ex As Exception
    MessageBox.Show("An error has occured, please try again.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
    End Try
    This code will browse for your selection.

    Exit Function code:
    Application.Exit()
    This code will close the program.

    Play Function Code:
    player.Ctlcontrols.play()
    This code will play the player.

    Stop Function Code:
    player.Ctlcontrols.stop()
    This Code will stop the player.

    Pause Function Code:
    player.Ctlcontrols.pause()
    This code will pause the player.

    Up Function Code:
    player.settings.volume = player.settings.volume + 10
    This code will turn the volume up.

    Down Function Code:
    player.settings.volume = player.settings.volume - 10
    This code will turn the volume down.

    Mute Function Code:
    If player.settings.volume = player.settings.mute() Then
    player.settings.volume = 20
    Else
    player.settings.volume = player.settings.mute()
    End If
    This code will mute the player.

    Entire Code:
    Public Class Form1

    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("An error has occured, please try again.", "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
    End Class
    Test your player, and enjoy!!

    It does not hurt to click thanks!

    Enjoy the player,
    ~Jerry

  2. The Following 10 Users Say Thank You to Jerry12358 For This Useful Post:

    bloddyapache (12-20-2009),Critted (10-24-2010),docoon (12-11-2009),iWAFFLE (12-06-2009),Katie_Perry (12-11-2009),kellisis (08-05-2013),MicroManage (12-19-2009),mnpeep (12-16-2009),Nitehawk772 Bkup (10-13-2011),nxkun (11-29-2011)

  3. #2
    greathamza's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Location
    with daves mom
    Posts
    5,607
    Reputation
    14
    Thanks
    505
    My Mood
    Asleep
    nice but i have already learnd this
    everybody lies


  4. The Following User Says Thank You to greathamza For This Useful Post:

    docoon (12-11-2009)

  5. #3
    Pixie's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Location
    Pixie wird wieder steigen.
    Posts
    1,884
    Reputation
    22
    Thanks
    229
    My Mood
    Fine
    Quote Originally Posted by greathamza View Post
    nice but i have already learnd this
    But I didn't

    But what is up and down??

  6. The Following User Says Thank You to Pixie For This Useful Post:

    docoon (12-11-2009)

  7. #4
    Jerry12358's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    gdg
    Posts
    28
    Reputation
    10
    Thanks
    16
    My Mood
    Drunk

    Smile

    Quote Originally Posted by PixieCorp View Post


    But I didn't

    But what is up and down??
    Volume Up

    Volume Down


  8. The Following 2 Users Say Thank You to Jerry12358 For This Useful Post:

    docoon (12-11-2009),Pixie (12-06-2009)

  9. #5
    Lolland's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    Lolland!
    Posts
    3,156
    Reputation
    49
    Thanks
    868
    My Mood
    Inspired
    Why don't you make one without the windows media preset? I would make a tut but I'm too lazy :P

  10. #6
    Jerry12358's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    gdg
    Posts
    28
    Reputation
    10
    Thanks
    16
    My Mood
    Drunk
    Quote Originally Posted by lolland View Post
    Why don't you make one without the windows media preset? I would make a tut but I'm too lazy :P

    I'm to lazzy to, thats why I chose the easy way

  11. #7
    cru0's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Posts
    108
    Reputation
    10
    Thanks
    13
    My Mood
    Asleep

    need help

    im at the coding part where do i paste the funt im very new to vb

  12. #8
    iWAFFLE's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Location
    Houston
    Posts
    704
    Reputation
    10
    Thanks
    38
    My Mood
    Amused
    Thanks,but it's just a tad bit confusing =C

  13. #9
    XGelite's Avatar
    Join Date
    Mar 2009
    Gender
    male
    Location
    Enter text here
    Posts
    1,344
    Reputation
    12
    Thanks
    276
    the book i posted on vb tells you how to do this ^^.

    but nice tut!

  14. The Following User Says Thank You to XGelite For This Useful Post:

    Jerry12358 (12-07-2009)

  15. #10
    Jerry12358's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    gdg
    Posts
    28
    Reputation
    10
    Thanks
    16
    My Mood
    Drunk
    Quote Originally Posted by cru0 View Post
    im at the coding part where do i paste the funt im very new to vb
    Funt? How you mean? Explain more and we might help

  16. #11
    Jerry12358's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    gdg
    Posts
    28
    Reputation
    10
    Thanks
    16
    My Mood
    Drunk
    Quote Originally Posted by iWAFFLE View Post
    Thanks,but it's just a tad bit confusing =C

    What part is confusing? If you say i can change

  17. #12
    cru0's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Posts
    108
    Reputation
    10
    Thanks
    13
    My Mood
    Asleep

    func

    Quote Originally Posted by Jerry12358 View Post
    Funt? How you mean? Explain more and we might help
    i meant function

  18. #13
    PoP_KiLLaH's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Watching Hentai
    Posts
    644
    Reputation
    17
    Thanks
    229
    My Mood
    Devilish
    didn't learned the video player.
    Good TUT

  19. #14
    DBB's Avatar
    Join Date
    Jul 2009
    Gender
    female
    Posts
    1,183
    Reputation
    12
    Thanks
    108
    My Mood
    Breezy
    I like Misa Campo.

  20. #15
    Katie_Perry's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Posts
    3,082
    Reputation
    31
    Thanks
    175
    My Mood
    Sneaky
    Thanks newb here :]

Page 1 of 2 12 LastLast

Similar Threads

  1. [TUT]How To Make Your Own Combat Arms Launcher Skin[TUT]
    By Corndog in forum Combat Arms Hacks & Cheats
    Replies: 46
    Last Post: 08-12-2009, 03:40 PM
  2. [TuT] How to make your own tags
    By Joshcarr2006 in forum CrossFire Hacks & Cheats
    Replies: 28
    Last Post: 06-03-2009, 05:57 PM
  3. [TuT] How to make your own toolbar easily!
    By johnny608 in forum Programming Tutorials
    Replies: 3
    Last Post: 04-24-2009, 04:11 PM
  4. {TUT} How to make your own opk hack
    By mandog10 in forum Combat Arms Hacks & Cheats
    Replies: 28
    Last Post: 08-13-2008, 02:44 PM
  5. (TUT)how to make your own warrock menu
    By aprill27 in forum WarRock - International Hacks
    Replies: 0
    Last Post: 09-21-2007, 03:46 PM