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

C#

 
GeneralRe: how to run exe file in ram (on the fly) ? Pin
originSH3-Apr-07 5:27
originSH3-Apr-07 5:27 
QuestionUpdate properties of an arraylist of components quickly Pin
jonwalmsley3-Apr-07 1:56
jonwalmsley3-Apr-07 1:56 
Hi,

I'm trying to update a property on an arraylist of visual components on a form, getting the property value to set by calling a method on another object. However, performance is unacceptably slow.



public delegate void VisualComponentUpdateHandler(VisualComponent v, int val);<br />
public void VisualComponentUpdate(VisualComponent v, int val)<br />
{<br />
   v.Value = val;<br />
}



and running in a seperate thread:

<br />
VisualComponentUpdateHandler d = new VisualComponentUpdateHandler(VisualComponentUpdate);<br />
int val;<br />
while (true)<br />
{<br />
   foreach (VisualComponent v in visualComponentArrayList)<br />
   {<br />
      val = sourceObject.GetValue(Convert.ToInt32(v.Name));<br />
      d.Invoke(v, val)<br />
   }<br />
   Thread.Sleep(100);<br />
}


I added the Thread.Sleep(100) because without it, the visuals don't seem to update.

I've got anything up to 128 of the visual components to update - they're custom components derived from ProgressBar, displaying a measurement which is obtained from a program running on a seperate machine which passes a new sourceObject every 250ms to the program via .NET remoting (this updating mechanism runs in another thread and doesn't seem to be affected by the slowdown in response which occurs when the property update thread is running).

Unsure | :~
AnswerRe: Update properties of an arraylist of components quickly Pin
Bijesh3-Apr-07 3:15
Bijesh3-Apr-07 3:15 
GeneralRe: Update properties of an arraylist of components quickly Pin
jonwalmsley3-Apr-07 3:59
jonwalmsley3-Apr-07 3:59 
GeneralRe: Update properties of an arraylist of components quickly Pin
jonwalmsley3-Apr-07 4:20
jonwalmsley3-Apr-07 4:20 
QuestionHow to start method after another one finishes (Thread) Pin
choopie3-Apr-07 1:38
choopie3-Apr-07 1:38 
AnswerRe: How to start method after another one finishes (Thread) Pin
karam chandrabose3-Apr-07 1:46
karam chandrabose3-Apr-07 1:46 
GeneralRe: How to start method after another one finishes (Thread) Pin
choopie3-Apr-07 2:28
choopie3-Apr-07 2:28 
GeneralRe: How to start method after another one finishes (Thread) Pin
choopie3-Apr-07 2:30
choopie3-Apr-07 2:30 
AnswerRe: How to start method after another one finishes (Thread) Pin
Bijesh3-Apr-07 2:38
Bijesh3-Apr-07 2:38 
GeneralRe: How to start method after another one finishes (Thread) Pin
choopie3-Apr-07 2:57
choopie3-Apr-07 2:57 
Questionhow to see raw xml in webservices Pin
turgut eren3-Apr-07 1:32
turgut eren3-Apr-07 1:32 
AnswerRe: how to see raw xml in webservices Pin
Marek Grzenkowicz3-Apr-07 3:46
Marek Grzenkowicz3-Apr-07 3:46 
QuestionDatabase Pin
kk.tvm3-Apr-07 1:28
kk.tvm3-Apr-07 1:28 
AnswerRe: Database Pin
karam chandrabose3-Apr-07 1:41
karam chandrabose3-Apr-07 1:41 
QuestionAlign toolstrip backgroundimage to the right? [modified] Pin
akkram3-Apr-07 1:03
akkram3-Apr-07 1:03 
Questionhi Pin
sooreeagt3-Apr-07 0:27
sooreeagt3-Apr-07 0:27 
AnswerRe: hi Pin
originSH3-Apr-07 0:35
originSH3-Apr-07 0:35 
GeneralRe: hi Pin
Martin#3-Apr-07 0:54
Martin#3-Apr-07 0:54 
GeneralRe: hi Pin
J4amieC3-Apr-07 1:15
J4amieC3-Apr-07 1:15 
GeneralRe: hi Pin
Martin#3-Apr-07 1:19
Martin#3-Apr-07 1:19 
GeneralRe: hi Pin
karam chandrabose3-Apr-07 1:39
karam chandrabose3-Apr-07 1:39 
GeneralRe: hi Pin
Martin#3-Apr-07 1:42
Martin#3-Apr-07 1:42 
JokeRe: hi Pin
joon vh.3-Apr-07 1:27
joon vh.3-Apr-07 1:27 
GeneralRe: hi Pin
originSH3-Apr-07 2:47
originSH3-Apr-07 2:47 

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.