Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

VB 6.0 :Creating a Media Player ,Video Player ...


  • Please log in to reply
46 replies to this topic

#37 orispo

orispo

    CC Newcomer

  • Just Joined
  • PipPip
  • 14 posts

Posted 08 October 2009 - 12:55 PM

great i tried it and it works
  • 0

#38 haxftw

haxftw

    CC Lurker

  • Just Joined
  • Pip
  • 2 posts

Posted 23 October 2009 - 12:08 PM

This is really cool, nice!
  • 0

#39 yrdchaos

yrdchaos

    CC Lurker

  • Just Joined
  • Pip
  • 1 posts

Posted 03 May 2010 - 07:44 AM

hi.. will it stil work if i create a my own design of an mp3 player.. or do I have to code the MP3 (my design) first...?
  • 0

#40 kweku

kweku

    CC Lurker

  • Just Joined
  • Pip
  • 2 posts

Posted 09 June 2010 - 06:04 AM

i remember doing a mediaplayer in delphi back in high school.
Good tutorial dou!
  • 0

#41 Epixors

Epixors

    CC Lurker

  • Just Joined
  • Pip
  • 1 posts

Posted 18 August 2010 - 07:46 AM

Hey, Nice tutorial, thanks, i changed the code a TINY bit to let it work with Visual Basic 2008, AWESOME, my problem is it doesnt play next number on play list :(

Here is my code.

Public Class ProjectExisPlayer

    Private Sub ProjectExisPlayer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim sFile As String

        With AxCommonDialog1
            .DialogTitle = "Open Media..."
            .CancelError = False
            .Filter = "All Suported Files"
            .ShowOpen()
            If Len(.FileName) = 0 Then
                Exit Sub
            End If
            sFile = .FileName

            With ListBox1
                ListBox1.Items.Add(sFile)
            End With
        End With
    End Sub

    Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
        AxWindowsMediaPlayer1.URL = ListBox1.Text
    End Sub
End Class

a much easier way to play ONE file in Visual Basic 2008 is THIS.

1. Add a Windows Media Player (AxWindowsMediaPlayer1 is the name)
2. Create a command button. (Button1)
3. Create a OpenFile Dialog.

At the button code put this:

OpenFileDialog1.ShowDialog()
AxWindowsMediaPlayer1.URL = OpenFileDialog1.FileName

Go back to design and open up the Properties of OpenFileDialog1.

Set Filter to:

All Files(*.*)|*.*

Or whatever you want Filter to be, must be something.
  • 0

#42 chomu

chomu

    CC Lurker

  • Just Joined
  • Pip
  • 2 posts

Posted 21 January 2012 - 02:21 PM

you so amazing
  • 0

#43 PuddingEatsPanda

PuddingEatsPanda

    CC Resident

  • Advanced Member
  • PipPipPipPip
  • 57 posts
  • Programming Language:C++, C#
  • Learning:PHP, JavaScript, Bash, Others

Posted 09 September 2012 - 01:50 PM

Is it possible to make themes for this?
  • 0

Want to learn MOAR


#44 mendozaerick1234567890

mendozaerick1234567890

    CC Lurker

  • Just Joined
  • Pip
  • 1 posts
  • Programming Language:(Visual) Basic
  • Learning:(Visual) Basic

Posted 07 November 2012 - 12:40 AM

I have a question
if i want to be automatically play the next song!!!

what should i code?


cause in your program we need to click it to be play!
  • 0

#45 alex2011

alex2011

    CC Lurker

  • New Member
  • Pip
  • 3 posts

Posted 18 March 2013 - 06:47 AM

I like this tutorial, is there any way to make the program open files automatically? I mean like other media players can, open the file directly from explorer instead of having to add to the list in the tutorial every time. I have never done anything like this before, I have only programmed text based adventures before this.


  • 0

#46 alex2011

alex2011

    CC Lurker

  • New Member
  • Pip
  • 3 posts

Posted 18 March 2013 - 08:16 AM

I tried associating a format with the player I programmed based on this tutorial, it failed. It does open, but it doesn't do anything else.


  • 0

#47 alex2011

alex2011

    CC Lurker

  • New Member
  • Pip
  • 3 posts

Posted 25 April 2013 - 10:17 PM

I got it working, I just had to call a different function to get it to play the files directly from windows. I am now working on making this player closer to full functionality.


  • 0