Activity Stream
48,167 MEMBERS
6601 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 5 of 5
  1.     
    #1
    Member
    Website's:
    InstantRDP.com

    Default Play selected listbox item

    PHP Code: 
     private void axWindowsMediaPlayer1_Enter(object senderEventArgs e)
            {
                
                
    String playname listBox1.SelectedItem.ToString();
                
    richTextBox3.Text playname;
                
    axWindowsMediaPlayer1.URL playname;
                
    axWindowsMediaPlayer1.Ctlcontrols.play();
                
    axWindowsMediaPlayer1.Ctlcontrols.pause();
                
    axWindowsMediaPlayer1.Ctlcontrols.stop();
                
    axWindowsMediaPlayer1.Ctlcontrols.next();

            } 
    I sometimes get error in between something to use new function for extracting string.
    How to use that function ?
    How to do this - If I double click a listbox item, WMP starts playing it.


    Another thing is when I select a song from listbox and click play it plays, but the play button looks inactive at default though everything works and plays correctly.
    pankaj Reviewed by pankaj on . Play selected listbox item private void axWindowsMediaPlayer1_Enter(object sender, EventArgs e) { String playname = listBox1.SelectedItem.ToString(); richTextBox3.Text = playname; axWindowsMediaPlayer1.URL = playname; axWindowsMediaPlayer1.Ctlcontrols.play(); axWindowsMediaPlayer1.Ctlcontrols.pause(); axWindowsMediaPlayer1.Ctlcontrols.stop(); axWindowsMediaPlayer1.Ctlcontrols.next(); Rating: 5




  2.   Sponsored Links

  3.     
    #2
    Respected Developer
    PHP Code: 
    if (listBox1.SelectedItem != null)
    {
        
    richTextBox3.Text axWindowsMediaPlayer1.URL = (string)listBox1.SelectedItem;

    I doubt you're using the best event for this situation.

  4.     
    #3
    Member
    Website's:
    InstantRDP.com
    I'll try that out. I guess that error occurs when sometimes no item is there to be selected.

    See, what my app does.
    It gets source of a site and extract the mp3 URL's and lists them on text box.
    My problem is when I type a song name and hit enter , the app gets out of control i.e. looks like it has hanged but it actually repeats the above process to list the songs, how to fix that ?

    Reply this here. made a separate thread for listing all my problems about this app.
    http://www.besthostingforums.com/showthread.php?t=39593




  5.     
    #4
    Respected Developer
    You'll need to learn what threads are and how to use them. Threads allow you to do multiple things at ones.

  6.     
    #5
    Member
    Website's:
    InstantRDP.com
    Did you mean about hanging problem ?

    http://www.besthostingforums.com/showthread.php?t=39593

    I just need to extract 10 URL's. can't it be solved without threads.




Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Pirate Bay To Offer Physical Item Downloads
    By Daniel in forum News & Current Events
    Replies: 2
    Last Post: 24th Jan 2012, 11:19 PM
  2. Need to Sell an Item? List your hosting?
    By Starnova in forum Community Cooperative
    Replies: 0
    Last Post: 23rd Sep 2011, 01:58 AM
  3. [Selling] Graphics Service - 1$ Per Item!
    By Rambo1337 in forum Completed Transactions
    Replies: 4
    Last Post: 17th Nov 2010, 05:04 AM
  4. Trading some of my shit for this item
    By ViPeRR in forum Completed Transactions
    Replies: 5
    Last Post: 14th Oct 2010, 10:08 AM
  5. play trade account on play.com question
    By priviet02 in forum General Discussion
    Replies: 0
    Last Post: 25th Aug 2009, 03:50 PM

Tags for this Thread

BE SOCIAL