Click here to Skip to main content
15,913,027 members
Home / Discussions / C#
   

C#

 
AnswerRe: Visual Studio and .Net Runtime Framework dependency Pin
Hessam Jalali7-Aug-07 3:15
Hessam Jalali7-Aug-07 3:15 
GeneralRe: Visual Studio and .Net Runtime Framework dependency Pin
George_George7-Aug-07 3:53
George_George7-Aug-07 3:53 
QuestionRich Text Box control- help Pin
Hum Dum7-Aug-07 1:54
Hum Dum7-Aug-07 1:54 
AnswerRe: Rich Text Box control- help Pin
Hessam Jalali7-Aug-07 3:25
Hessam Jalali7-Aug-07 3:25 
Questionhow to convert 2005 to 2003 Pin
avinol7-Aug-07 1:46
avinol7-Aug-07 1:46 
AnswerRe: how to convert 2005 to 2003 [modified] Pin
Hessam Jalali7-Aug-07 1:52
Hessam Jalali7-Aug-07 1:52 
Questionhow to validate register user that his validity got end Pin
avinol7-Aug-07 1:39
avinol7-Aug-07 1:39 
AnswerRe: how to validate register user that his validity got end Pin
Chetan Patel7-Aug-07 2:08
Chetan Patel7-Aug-07 2:08 
AnswerRe: how to validate register user that his validity got end Pin
Chintan.Desai7-Aug-07 2:09
Chintan.Desai7-Aug-07 2:09 
QuestionPost a XML file to URL Pin
Kumar Arun7-Aug-07 1:20
Kumar Arun7-Aug-07 1:20 
AnswerRe: Post a XML file to URL Pin
Christian Graus7-Aug-07 1:23
protectorChristian Graus7-Aug-07 1:23 
AnswerRe: Post a XML file to URL Pin
Chintan.Desai7-Aug-07 2:13
Chintan.Desai7-Aug-07 2:13 
Questionprinter Pin
help as an alias7-Aug-07 1:16
help as an alias7-Aug-07 1:16 
AnswerRe: printer Pin
lsconyer7-Aug-07 1:32
lsconyer7-Aug-07 1:32 
GeneralRe: printer Pin
help as an alias7-Aug-07 1:37
help as an alias7-Aug-07 1:37 
AnswerRe: printer Pin
Hessam Jalali7-Aug-07 2:14
Hessam Jalali7-Aug-07 2:14 
QuestionThreadiing Pin
james_dixon_20087-Aug-07 0:27
james_dixon_20087-Aug-07 0:27 
AnswerRe: Threadiing Pin
Christian Graus7-Aug-07 0:42
protectorChristian Graus7-Aug-07 0:42 
GeneralRe: Threadiing Pin
james_dixon_20087-Aug-07 1:28
james_dixon_20087-Aug-07 1:28 
GeneralRe: Threadiing Pin
Tristan Rhodes7-Aug-07 2:04
Tristan Rhodes7-Aug-07 2:04 
GeneralRe: Threadiing Pin
james_dixon_20087-Aug-07 3:00
james_dixon_20087-Aug-07 3:00 
Yeh you are right. Just have a look in what i did. Its working but i want to know if there is any other better approach..

<br />
private void Startbtn_Click(Object sender, EventArgs e)<br />
{<br />
  Thread t = new Thread(new ThreadStart(try));<br />
  t.Start()<br />
}<br />
<br />
void try()<br />
{<br />
  int count = 0;<br />
  while (true)<br />
  {<br />
    if(count > 1000)<br />
    {<br />
      break;<br />
    }<br />
    Thread.Sleep(1000);<br />
    if(InvokeRequired)<br />
    Invoke(new new_try_delegate(new_try));<br />
    count++;<br />
  }<br />
}<br />
<br />
 public delegate void new_try_delegate();<br />
<br />
 void new_try()<br />
 {<br />
  textBox1.Text += "This is new Thread" + Environment.NewLine;<br />
 }<br />
<br />
<br />


Now the above code just repeat the message "This is new Thread" for 1000 times and it works fine. But now my questions are:---

1.] Can i use same delegate call i.e. public delegate voud new_try_delegate() for all different threads i create.

And does it work the same way if i am writing data into textbox from different location of my application.

Lastly can you suggest me some more options to test so that i understand it better.

Cheers Smile | :)
GeneralRe: Threadiing Pin
pbraun7-Aug-07 4:44
pbraun7-Aug-07 4:44 
GeneralRe: Threadiing Pin
Tristan Rhodes7-Aug-07 5:00
Tristan Rhodes7-Aug-07 5:00 
GeneralRe: Threadiing Pin
james_dixon_20087-Aug-07 6:40
james_dixon_20087-Aug-07 6:40 
GeneralRe: Threadiing Pin
Tristan Rhodes7-Aug-07 4:46
Tristan Rhodes7-Aug-07 4:46 

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.