Click here to Skip to main content
15,916,288 members
Home / Discussions / C#
   

C#

 
GeneralRe: how a dataset can transfer from server to client using socket programming in C# Pin
abhishek2931-Mar-09 7:31
abhishek2931-Mar-09 7:31 
GeneralRe: how a dataset can transfer from server to client using socket programming in C# Pin
agent00zelda31-Mar-09 8:22
agent00zelda31-Mar-09 8:22 
GeneralRe: how a dataset can transfer from server to client using socket programming in C# Pin
0x3c031-Mar-09 8:28
0x3c031-Mar-09 8:28 
Questionhow to group...... Pin
priyareguri31-Mar-09 5:55
priyareguri31-Mar-09 5:55 
JokeRe: how to group...... Pin
musefan31-Mar-09 6:14
musefan31-Mar-09 6:14 
GeneralRe: how to group...... Pin
Yusuf31-Mar-09 6:20
Yusuf31-Mar-09 6:20 
GeneralRe: how to group...... Pin
Fayu31-Mar-09 6:27
Fayu31-Mar-09 6:27 
AnswerRe: how to group...... Pin
DaveyM6931-Mar-09 6:22
professionalDaveyM6931-Mar-09 6:22 
AnswerRe: how to group...... Pin
0x3c031-Mar-09 6:35
0x3c031-Mar-09 6:35 
Question8 queen Pin
Reza S31-Mar-09 5:33
Reza S31-Mar-09 5:33 
AnswerRe: 8 queen PinPopular
musefan31-Mar-09 5:40
musefan31-Mar-09 5:40 
GeneralRe: 8 queen Pin
Colin Angus Mackay31-Mar-09 5:47
Colin Angus Mackay31-Mar-09 5:47 
GeneralRe: 8 queen Pin
Yusuf31-Mar-09 6:21
Yusuf31-Mar-09 6:21 
AnswerRe: 8 queen Pin
harold aptroot31-Mar-09 5:46
harold aptroot31-Mar-09 5:46 
AnswerRe: 8 queen Pin
Luc Pattyn31-Mar-09 5:57
sitebuilderLuc Pattyn31-Mar-09 5:57 
QuestionWhere i wrong??? Pin
VisualLive31-Mar-09 5:16
VisualLive31-Mar-09 5:16 
Hi i'm getting exhausted about a simple feature but sincerely i don't know how work out that Frown | :(
I have this code to use Window Media Player :

public partial class Form1 : Form
 {

     TextBox textbox;
     public Form1()
     {
         InitializeComponent();
         listBox1.SelectedIndexChanged += listBox1_SelectedIndexChanged;
         textbox = new TextBox { Dock = DockStyle.Top };
         listBox1.SelectionMode = SelectionMode.MultiExtended;
     }

     private void Form1_Load(object sender, EventArgs e)
     {
       List<string> prova =  GetListOfFiles(@"D:\\Torrent\\Depeche Mode - Sounds Of The Universe (2009)\\");

         listBox1.DataSource = prova;
         listBox1.DisplayMember = "prova";
         player1.settings.setMode("Shuffle", true);
         player1.Ctlcontrols.play();

     }

     private List<string> GetListOfFiles(string Folder)
     {
         DirectoryInfo dir = new DirectoryInfo(Folder);
         FileInfo[] files = dir.GetFiles("*.mp3", SearchOption.AllDirectories);
         List<string> str = new List<string>();
         foreach (FileInfo file in files)
         {
             str.Add(file.FullName);

         }
         return str;
     }

      private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
     {
         Text = Convert.ToString(listBox1.SelectedItem);
         player1.URL = Convert.ToString(listBox1.SelectedItem);
     }

     private void textBox1_KeyDown(object sender, KeyEventArgs e)
     {
         if (e.KeyCode == Keys.Return)
         {
             string searchFor = textBox1.Text;
             List<string> strings = (List<string>)listBox1.DataSource;
             if (multi.Checked)
             {
                 for (int i = 0; i < strings.Count; i++)
                 {
                     listBox1.SetSelected(i, strings[i].Contains(searchFor));
                 }
             }
             else
             {
                 listBox1.ClearSelected();
                 listBox1.SelectedIndex = strings.FindIndex(
                     s => s.Contains(searchFor));
             }
         }
     }


 }


With this code i can search songs and show in a ListBox the list downloaded in a folder but my purpose is when Window Music Player change song automatically the ListBoxItem will change marker and show the current song instead now when WMP change song the marker of the listBox did not move .
An important characteristic is the i set the WPM in RandomPlay it is a feature requested.
Do you have any idea how i can work out that from some day i felt a little confuse to find out the right way but not luck.
Have a good luck.

Nice Regards
AnswerRe: Where i wrong??? Pin
Yusuf31-Mar-09 6:24
Yusuf31-Mar-09 6:24 
GeneralRe: Where i wrong??? [modified] Pin
VisualLive31-Mar-09 7:15
VisualLive31-Mar-09 7:15 
GeneralRe: Where i wrong??? Pin
Yusuf31-Mar-09 9:03
Yusuf31-Mar-09 9:03 
GeneralRe: Where i wrong??? Pin
VisualLive31-Mar-09 16:03
VisualLive31-Mar-09 16:03 
QuestionAdhoc networking using windows application in VS2005 Pin
alish061031-Mar-09 5:00
alish061031-Mar-09 5:00 
AnswerRe: Adhoc networking using windows application in VS2005 Pin
musefan31-Mar-09 5:12
musefan31-Mar-09 5:12 
GeneralRe: Adhoc networking using windows application in VS2005 Pin
alish061031-Mar-09 20:17
alish061031-Mar-09 20:17 
QuestionOpenFileDialog Pin
netJP12L31-Mar-09 4:22
netJP12L31-Mar-09 4:22 
AnswerRe: OpenFileDialog Pin
musefan31-Mar-09 4:30
musefan31-Mar-09 4:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.