.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

C# - Easy - Play music + Next song! - Please Look

Posted By:      Posted Date: August 31, 2010    Points: 0   Category :Windows Application
Hello! Today i try write my own Music Player in C# - winmm.dll, but I don't know, how to go to next song, when last is end. My Aplication: Button1. Load music. Button2. Add address from textBox, to listbox. Button3. Stop playing. And all work, when i add my music to playlist, and click on selected address, music start. But: - How i can go to next song, when last end?. Because now, when song is end, player no start play next song. Eg: Music1 Music2 Music3 Music4 Eg. - When I click on Music2 it starts to play, but then wants go to the next song when Music2 end - in this case Music3 . - When I click on Music1 it starts to play, but then wants go to the next song when Music1 end - in this case Music2 . etc... Easy Play list... Eg: In listBox have: C:/Music/Blablabla.mp3 C:/Music/Blablabla2.mp3 C:/Music/Blablabla3.mp3 And i want: C:/Music/Blablabla.mp3 started.... Song.... End. Now my program: Play song... When song end, make nothing. I want when: C:/Music/Blablabla.mp3 when song is end, go to C:/Music/Blablabla2.mp3. When C:/Music/Blablabla2.mp3 end go to: C:/Music/Blablabla3.mp3. When C:/Music/Blablabla3.mp3 end, go to: C:/Music/Blablabla.mp3 (First song) This is my code:     using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.

View Complete Post

More Related Resource Links

Play uninterrupted music across postbacks

Hi,I'm in need of providing uninterrupted music to the visitor of my web site.The music is played by a 3rd party Flash object. I need to some how maintain an instance of this flash object in memory so that the visitor of the site will experience uninterrupted music (even while navigating to the other pages in the site).The idea is to have one instance in memory (hidden which survives postbacks) and the othe displayed to the visitor (this will sync up with the hidden player).If you suggest using iFrame in a master page, pl let me know how to handle multiple master pages scenario. My site contains more than one master page. And with iFrame we don't get to see the actual URL being served in the address bar.I know pop-up window is another option. But would like to know if I can do anything with the iFrame.Thanks.

I need a static music player on my website that continues to play music when the user navigates to d

I'm not sure if this is the right area, but I'm needing to have a music player on my website that stays static when the user navigates through my site, and continues to play without interruption.  Currently I have a Flash player that works great, but obviously it stops playing when the user goes to a different area of the site.  Make sense??  Thanks in advance!!

Need to play music and videos


I have created a documents library in a SP2010 site for users to upload any type of media, including music, video, images, whatever.

When one of the uploaded items is clicked, I expected it to open the appropriate software to display an image, or play music or video, etc.

The music and video examples aren't working properly.  When the video is clicked, it opens Windows Media Player and plays the audio, but not the video.  Instead it shows an animated starburst thing.

When music is clicked, a File Download dialogue box pops up ... nothing plays.  However, when I click on the music file outside of SP2010, it plays via iTunes.

When I created the library, I selected "none" for the document template which defaults to Microsoft Word.  I notice that the "type" icon beside both music and video is a blank page with the right hand corner turned down.  It looks like it hasn't figured out what the items are.  The music item has an extension of m4a.  The video has an extension of AVI.


How can we download a song file and play it automatically with the native browser ?



      I want to open the songfile automatically with blackberry native music player ,upon clicking that link. I have searched almost all web , but i was not able to find a solution, how we can download and open a file with native medal player browser. All the code samples i got was in java.  Is there any code for doing that in asp.net ? Any alternative in html?  The <object> & <embedd> tags are not displaying in the browser when i run the project. So, i think it won't work ? Is there any possible solution for that.... Suppose the content type="audio/mp3" . can any one specify code for that ?

      When normal downloading, again Request Entity Too Large Error appears. It's not bcoz the file is large, Itz only 344 kb. Still its not working.Why is it so?

     Any help would be appreciated !

           Thanking All,


Six easy ways to customize your site using Web Parts in SharePoint

Becoming familiar with Web Part customization techniques gives you a range of page-customization choices. For example, you can customize your site's home page so that it displays the specific information that your team needs. You can rearrange the list items on the home page, add lists, and even change the images on the home page. As you become more familiar with Web Part Page customization techniques, you can build interactive Web Part Pages that makes the data in lists more dynamic and useful, and you can add new Web Parts that provide access to external data and Web services.

The Free Barcode Creator produces barcode images one at a time, and allows easy saving to a file or

The Free Barcode Creator produces barcode images one at a time, and allows easy saving to a file or pasting into an application. 2D versions are also available:

Play video


Hi to all 

 I have asp.net 2.0 & VS 2005. I want to play a video file in my web application, is there any control for this else help me how to play video in browser. Is this complex ?

Easy image processing(grayscale, sepia, negative, resize, brightness, contrast and opacity)

Howdie y'all,

I see a lot of questions in this forum about resizing images. Recently I created a code sample(with downloadable webapp), right here.

The class (downloaded or created) allows for very fast and easy processing of your images. And a lot of problems over here can be solved by simply using that class. I thought it might help to mention the code sample in this forum as well.



UI Frontiers: MIDI Music in WPF Applications


Every PC contains a built-in 16-piece band ready to play some music. Charles shows you how MIDI support in the NAudio sound library lets you play tunes in your .NET apps.

Charles Petzold

MSDN Magazine March 2010

Windows Mobile and Accelerometers: Shake and Skip to Interact with Your Music


This article describes an approach to using accelerometers with Windows Mobile to control Windows Media Player Mobile.

Chris Mitchell

MSDN Magazine September 2009

Toolbox: Easy File Backup, Exploring Files And Folders Inside Visual Studio, Multiple Monitor Softwa


If the responsibility for creating, managing, and executing routine backups is yours, these tools will make it easier. Also see how you can browse folders and files from inside Visual Studio.

Scott Mitchell

MSDN Magazine May 2009

Toolbox: Online Scheduling, Jeff Smith's SQL Blog, Easy Regular Expressions, And More


This month Scott looks at improving development skills, writing regular expressions, a web scheduling control and a SQL tips blog.

Scott Mitchell

MSDN Magazine November 2008

Easy Async: Build Concurrent Apps From Simple F# Expressions


In this article, the author explores how the F# language helps you create asynchronous function libraries that can be called seamlessly from any other .NET-compliant language.

Chance Coble

MSDN Magazine October 2008

Toolbox: Easy LINQ Queries, Becoming A Better Developer, And Logging Help


This month Toolbox provides help with error logging, finds an app that helps you write LINQ queries, and explores the non-technical side of development.

Scott Mitchell

MSDN Magazine September 2008

Toolbox: Easy Wiki Hosting, Scott Hanselman's blog, and Snagging Screens


Host a wiki the easy way, get the screen shots you need and mark them up, and read about LINQ this month in Toolbox.

Scott Mitchell

MSDN Magazine July 2008

Toolbox: Easy Web Debugging, Extending Reflector, and More


This month, a better design-time experience for Web apps, Scott Guthrie's blog, extending Extend Lutz Roeder's Reflector, and more.

Scott Mitchell

MSDN Magazine March 2008

Least Privilege: Teach Your Apps To Play Nicely With Windows Vista User Account Control


User Account Control in Windows Vista keeps the OS safe from intentional and accidental configuration changes.

Chris Corio

MSDN Magazine January 2007

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend