Click here to Skip to main content
15,922,584 members
Home / Discussions / C#
   

C#

 
QuestionScrewed up again in drawing, plz help Christian:) Pin
Muammar©20-May-07 23:42
Muammar©20-May-07 23:42 
AnswerRe: Screwed up again in drawing, plz help Christian:) Pin
PandemoniumPasha20-May-07 23:59
PandemoniumPasha20-May-07 23:59 
GeneralRe: Screwed up again in drawing, plz help Christian:) Pin
Muammar©21-May-07 0:04
Muammar©21-May-07 0:04 
AnswerRe: Screwed up again in drawing, plz help Christian:) Pin
Christian Graus21-May-07 0:01
protectorChristian Graus21-May-07 0:01 
GeneralRe: Screwed up again in drawing, plz help Christian:) Pin
Muammar©21-May-07 0:10
Muammar©21-May-07 0:10 
GeneralRe: Screwed up again in drawing, plz help Christian:) Pin
Muammar©21-May-07 0:55
Muammar©21-May-07 0:55 
GeneralRe: Screwed up again in drawing, plz help Christian:) Pin
Christian Graus21-May-07 1:02
protectorChristian Graus21-May-07 1:02 
GeneralRe: Screwed up again in drawing, plz help Christian:) Pin
Muammar©21-May-07 1:40
Muammar©21-May-07 1:40 
AnswerRe: Screwed up again in drawing, plz help Christian:) Pin
sujithkumarsl21-May-07 0:02
sujithkumarsl21-May-07 0:02 
GeneralRe: Screwed up again in drawing, plz help Christian:) Pin
Muammar©21-May-07 0:07
Muammar©21-May-07 0:07 
QuestionScreen resolution problems on widescreen (regular Form) Pin
anderslundsgard20-May-07 23:09
anderslundsgard20-May-07 23:09 
AnswerRe: Screen resolution problems on widescreen (regular Form) Pin
Christian Graus20-May-07 23:13
protectorChristian Graus20-May-07 23:13 
GeneralRe: Screen resolution problems on widescreen (regular Form) Pin
anderslundsgard21-May-07 20:53
anderslundsgard21-May-07 20:53 
AnswerRe: Screen resolution problems on widescreen (regular Form) Pin
Bekjong20-May-07 23:16
Bekjong20-May-07 23:16 
GeneralRe: Screen resolution problems on widescreen (regular Form) Pin
Luc Pattyn21-May-07 0:20
sitebuilderLuc Pattyn21-May-07 0:20 
QuestionSolver in C# Pin
sujithkumarsl20-May-07 23:04
sujithkumarsl20-May-07 23:04 
AnswerRe: Solver in C# Pin
Muammar©20-May-07 23:53
Muammar©20-May-07 23:53 
GeneralRe: Solver in C# Pin
sujithkumarsl21-May-07 0:03
sujithkumarsl21-May-07 0:03 
GeneralRe: Solver in C# Pin
Muammar©21-May-07 0:06
Muammar©21-May-07 0:06 
AnswerRe: Solver in C# Pin
Christian Graus21-May-07 0:57
protectorChristian Graus21-May-07 0:57 
GeneralRe: Solver in C# Pin
sujithkumarsl21-May-07 1:06
sujithkumarsl21-May-07 1:06 
QuestionActive Directory Pin
Jayesh Talsaniya20-May-07 22:36
Jayesh Talsaniya20-May-07 22:36 
AnswerRe: Active Directory Pin
Muammar©20-May-07 23:58
Muammar©20-May-07 23:58 
GeneralRe: Active Directory Pin
Jayesh Talsaniya21-May-07 0:43
Jayesh Talsaniya21-May-07 0:43 
Questioncross-threading problem Pin
suck12320-May-07 22:31
suck12320-May-07 22:31 
hi,
I've got this part of code
<br />
public delegate void DellagacjaVoid();<br />
<br />
        public void pingowanie()<br />
        {<br />
            if (this.InvokeRequired)<br />
            {<br />
                DellagacjaVoid delegacja = new DellagacjaVoid(pingowanie);<br />
                this.Invoke(delegacja);<br />
            }<br />
<br />
            string sciezka = "plik.txt";<br />
            if (File.Exists(sciezka))<br />
            {                               <br />
                FileStream fs = new FileStream(sciezka, FileMode.Open, FileAccess.Read);<br />
                StreamReader reader = new StreamReader(fs);<br />
                string linia = reader.ReadLine();<br />
                linia = null;<br />
                while ((linia=reader.ReadLine()) != null)<br />
                {<br />
                    try<br />
                    {                        <br />
                        richTextBox1.Text += linia + "\n";<br />
                    }<br />
                    catch (Exception ex)<br />
                    {<br />
                        MessageBox.Show(ex.Message);<br />
                    }<br />
                }<br />
                reader.Close();<br />
            }<br />
        }<br />
<br />
private void button1_Click(object sender, EventArgs e)<br />
        {<br />
            Thread watek = new Thread(pingowanie);<br />
            watek.Start();            <br />
        }<br />


the thing is that the content i read to the richtextbox alright, as many lines as there are in the txt file but also I get as many exeptions as number of lines with the text like this:
http://img444.imageshack.us/img444/6911/88524168zy6.png[^]

can someone help?

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.