Media Player
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: Media Player

  1. #1
    Join Date
    Dec 2010
    Posts
    6

    Angry Media Player

    I receive an error when there is nothing playing and i click the stop button, how can i get rid of this error??

    The error says:Object reference not set to an instance of an object.

    Please help i need to finish it by Tuesday!

  2. #2
    Join Date
    Dec 2010
    Posts
    6

    Angry Re: Media Player

    P.S i use .net 3.5 and VS C#2008

  3. #3
    Join Date
    Oct 2008
    Location
    Cologne, Germany
    Posts
    756

    Re: Media Player

    Quote Originally Posted by Bellars View Post
    I receive an error when there is nothing playing and i click the stop button, how can i get rid of this error??
    do not click the stop button...

    but seriously, you could give some more information
    win7 x86, VS 2008 & 2010, C++/CLI, C#, .NET 3.5 & 4.0, VB.NET, VBA... WPF is comming

    remeber to give feedback you think my response deserves recognition? perhaps you may want to click the Rate this post link/button and add to my reputation

    private lessons are not an option so please don't ask for help in private, I won't replay

    if you use Opera and you'd like to have the tab-button functionality for the texteditor take a look at my Opera Tab-UserScirpt; and if you know how to stop firefox from jumping to the next control when you hit tab let me know

  4. #4
    Join Date
    Dec 2010
    Posts
    6

    Unhappy Re: Media Player

    But i really want a perfect app. it says this for the error, as I said, i need to do it quickly!


    It's an attachment!
    Attached Images Attached Images  

  5. #5
    Join Date
    Oct 2008
    Location
    Cologne, Germany
    Posts
    756

    Re: Media Player

    obviously the player (spWave) is null when you didn't click play before, just do this:
    Code:
    if(spWave != null)
       spWave.Stop();
    if there is a next time, you'll show your code without request. how do you think we can give you an advice whitout even having seen what you've already done :\
    win7 x86, VS 2008 & 2010, C++/CLI, C#, .NET 3.5 & 4.0, VB.NET, VBA... WPF is comming

    remeber to give feedback you think my response deserves recognition? perhaps you may want to click the Rate this post link/button and add to my reputation

    private lessons are not an option so please don't ask for help in private, I won't replay

    if you use Opera and you'd like to have the tab-button functionality for the texteditor take a look at my Opera Tab-UserScirpt; and if you know how to stop firefox from jumping to the next control when you hit tab let me know

  6. #6
    Join Date
    Dec 2010
    Posts
    6

    Re: Media Player

    yeah i'm sorry-really thanks a lot!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center