hi
excuse me (i can,t speak en good)
---------------------------------
my project have 15 text file (A.txt, B.txt & ...)
and have a listbox with items(A, B, & ...)
i want ...
when click in a item (A) from listbox ... open file (A.txt) in richtextbox !
how to do it ?
plz help ...
tanks
Loading

ghasem dehPosted Aug 9, 2014, 3:50 PM
how to show field from access database in comboBox ?
with add in table ... display in comboBox ... to use ...
thank's
this (c-sharpcorner.com) very good !
Ramesh MaruthiPosted Aug 7, 2014, 1:47 PM
{
List
listBox1.DataSource = str;
listBox1.DisplayMember = "str";
}
private List
{
DirectoryInfo dir = new DirectoryInfo(Folder);
FileInfo[] files = dir.GetFiles("*.mp3", SearchOption.AllDirectories);
List
foreach (FileInfo file in files)
{
str.Add(file.FullName);
}
return str;
}
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
string strSelected = listBox1.SelectedValue.ToString();
MessageBox.Show(strSelected); //Just demo, you can add code that have WMP played this file here
}
ghasem dehPosted Aug 7, 2014, 12:45 PM
when click in a item (A) from listbox ... play file (A.mp3) in media player c# !
-- on time : show txt and play mp3 file --
ghasem dehPosted Jul 28, 2014, 1:46 PM
Ramesh MaruthiPosted Jul 28, 2014, 12:05 PM
{
string mypath = "C:/Users/rmaruthi/Desktop/Samples/";
string[] filepaths = null;
private void readTXTfiles()
{
string filter = "*.txt";
ListBox1.Items.Clear();
filepaths = Directory.GetFiles(mypath, filter);
foreach (string str in filepaths)
{
ListBox1.Items.Add(str);
}
}
private void ListBox2_changed(object sender, EventArgs args)
{
string path = ListBox2.SelectedValue.ToString();
}
}
VulpesPosted Jul 28, 2014, 11:12 AM