Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Question about Listbox and axwindowsmediaplayer

$
0
0
Hello community,

I am still quite new to this forum and I am still a real beginner in programming with C #.
A little bit I can just off the ground, but I want to improve my program that I use for private use.
I want to use a listbox and the media player open my series database on the program.

Currently it looks like this (of course, not finished)
Posted Image


The names of the sequences are transmitted over the button with the following command in the list box:
           listBox1.Items.Clear();
            string path = @"D:\Animes\****\";
            string[] dirFiles = Directory.GetFiles(path);

            foreach (string file in dirFiles)
                listBox1.Items.Add(Path.GetFileNameWithoutExtension(file));
            listBox1.Items.Remove("desktop");


The whole is now in Form1.
Now I want that when I click on a result in the list box, the video plays in Form2.
For playing videos I use Windows Media Player (axWindowsMediaPlayer1).

Can anyone because someone may help? I get the not so pretty on the series.

Thank you very much


PS: sorry for my bad english ._.

Viewing all articles
Browse latest Browse all 51036

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>