Click here to Skip to main content
15,891,033 members
Home / Discussions / C#
   

C#

 
GeneralRe: FileSystemWatcher Alternative Pin
Luc Pattyn9-Nov-07 8:41
sitebuilderLuc Pattyn9-Nov-07 8:41 
GeneralRe: FileSystemWatcher Alternative Pin
ffowler9-Nov-07 9:00
ffowler9-Nov-07 9:00 
QuestionAsynchronous User Interface Pin
Tomerland9-Nov-07 3:12
Tomerland9-Nov-07 3:12 
AnswerRe: Asynchronous User Interface Pin
Judah Gabriel Himango9-Nov-07 4:21
sponsorJudah Gabriel Himango9-Nov-07 4:21 
GeneralRe: Asynchronous User Interface Pin
Tomerland9-Nov-07 4:49
Tomerland9-Nov-07 4:49 
GeneralRe: Asynchronous User Interface Pin
Luc Pattyn9-Nov-07 5:01
sitebuilderLuc Pattyn9-Nov-07 5:01 
AnswerRe: Asynchronous User Interface Pin
led mike9-Nov-07 5:17
led mike9-Nov-07 5:17 
Questiondisplay contents in liswtbox Pin
new2pgrmg9-Nov-07 3:02
new2pgrmg9-Nov-07 3:02 
HI,
I am trying to display the contends in a .cs folder inside a listbox .
i wrote the code where in i can open the file but after that how to show the contents inside the list box i am stuck.i want tehe list box to show all the codes inside the file.
do i need to use StreamReader?
otherwise how can i do it?

private void button1_Click(object sender, EventArgs e)
{
OpenFileDialog objDialog = new OpenFileDialog();
objDialog.Title = "Open .cs File";
objDialog.Filter = "C Sharp Files (*.cs)|*.cs|Text Files (*.txt)|*.txt";
objDialog.InitialDirectory = @"D:\back up d \users\k\ConsoleApplication1";
if (objDialog.ShowDialog() == DialogResult.OK)
{

MessageBox.Show(objDialog.FileName.ToString());

}
listBox1.Items.Add(@"D:\back up d \users\k\ConsoleApplication1");

Any help is welcome.
Thanking You

p
AnswerRe: display contents in liswtbox Pin
laserbaronen9-Nov-07 3:07
laserbaronen9-Nov-07 3:07 
AnswerRe: display contents in liswtbox Pin
Luc Pattyn9-Nov-07 3:53
sitebuilderLuc Pattyn9-Nov-07 3:53 
QuestionRegex problem Pin
laserbaronen9-Nov-07 2:57
laserbaronen9-Nov-07 2:57 
AnswerRe: Regex problem Pin
laserbaronen9-Nov-07 4:28
laserbaronen9-Nov-07 4:28 
QuestionSet checked state on all selected rows in datagridview Pin
hakonvik9-Nov-07 2:53
hakonvik9-Nov-07 2:53 
AnswerRe: Set checked state on all selected rows in datagridview Pin
Nathan Holt at EMOM9-Nov-07 5:30
Nathan Holt at EMOM9-Nov-07 5:30 
GeneralRe: Set checked state on all selected rows in datagridview Pin
hakonvik9-Nov-07 10:07
hakonvik9-Nov-07 10:07 
QuestionSqlNotification Problem. Pin
hdv2129-Nov-07 1:46
hdv2129-Nov-07 1:46 
AnswerRe: SqlNotification Problem. Pin
TJoe9-Nov-07 2:06
TJoe9-Nov-07 2:06 
GeneralRe: SqlNotification Problem. Pin
hdv2129-Nov-07 4:19
hdv2129-Nov-07 4:19 
QuestionLoad an image with directx Pin
QzRz9-Nov-07 1:27
QzRz9-Nov-07 1:27 
QuestionThousands of remote message queues - possible? Pin
jenspa8-Nov-07 23:46
jenspa8-Nov-07 23:46 
AnswerRe: Thousands of remote message queues - possible? Pin
jenspa9-Nov-07 1:16
jenspa9-Nov-07 1:16 
QuestionInteresting Project? Pin
daviiie8-Nov-07 23:37
daviiie8-Nov-07 23:37 
AnswerRe: Interesting Project? Pin
Colin Angus Mackay9-Nov-07 0:43
Colin Angus Mackay9-Nov-07 0:43 
GeneralRe: Interesting Project? Pin
daviiie9-Nov-07 1:20
daviiie9-Nov-07 1:20 
Questiongridviewer Pin
merwa8-Nov-07 23:31
merwa8-Nov-07 23:31 

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.