Click here to Skip to main content
15,888,263 members
Home / Discussions / C#
   

C#

 
GeneralRe: Slow UI updation problem Pin
Martin#13-Aug-07 23:32
Martin#13-Aug-07 23:32 
GeneralRe: Slow UI updation problem Pin
getnanda@gmail.com13-Aug-07 23:50
getnanda@gmail.com13-Aug-07 23:50 
GeneralRe: Slow UI updation problem Pin
J4amieC13-Aug-07 23:57
J4amieC13-Aug-07 23:57 
GeneralRe: Slow UI updation problem Pin
getnanda@gmail.com14-Aug-07 0:08
getnanda@gmail.com14-Aug-07 0:08 
GeneralRe: Slow UI updation problem Pin
sathish s14-Aug-07 0:01
sathish s14-Aug-07 0:01 
GeneralRe: Slow UI updation problem Pin
Pete O'Hanlon14-Aug-07 0:09
mvePete O'Hanlon14-Aug-07 0:09 
GeneralRe: Slow UI updation problem Pin
Colin Angus Mackay14-Aug-07 0:31
Colin Angus Mackay14-Aug-07 0:31 
AnswerRe: Slow UI updation problem Pin
Luc Pattyn14-Aug-07 0:42
sitebuilderLuc Pattyn14-Aug-07 0:42 
Hi,

three comments:

1.
the system clock has a resolution of only 10 to 20 msec depending on hardware;
so I am not sure I trust your time measurement. See my timers article.

2.
400 textboxes is just silly. If all they do is show a little string, I suggest
you take them all out, and paint those strings directly to one big Panel, or
to the Form itself. That way you are in charge and not wasting any resources.
You can still have your own myTextBox class that has Location, Text and whatever
properties you like (less is more); plus a collection of those; then a Paint handler
that enumerates the collection and paints these "lightweight labels".

3.
I agree with who ever said updating a screen every msec does not make much sense,
so you might run your simulation at "full speed" and update the display say
every clock tick or every other clock tick.
You can do this by not calling Invalidate() when you change the drawing,
but instead have a periodic timer call Invalidate(). This works well together
with the lightweight labels.

Smile | :)



Luc Pattyn [Forum Guidelines] [My Articles]


this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google


GeneralRe: Slow UI updation problem Pin
Dave Kreskowiak14-Aug-07 3:29
mveDave Kreskowiak14-Aug-07 3:29 
GeneralRe: Slow UI updation problem Pin
Luc Pattyn14-Aug-07 5:58
sitebuilderLuc Pattyn14-Aug-07 5:58 
GeneralRe: Slow UI updation problem Pin
Pete O'Hanlon14-Aug-07 9:32
mvePete O'Hanlon14-Aug-07 9:32 
GeneralRe: Slow UI updation problem Pin
Luc Pattyn14-Aug-07 13:26
sitebuilderLuc Pattyn14-Aug-07 13:26 
GeneralRe: Slow UI updation problem Pin
Pete O'Hanlon14-Aug-07 22:00
mvePete O'Hanlon14-Aug-07 22:00 
AnswerRe: Slow UI updation problem Pin
N a r e s h P a t e l14-Aug-07 0:48
N a r e s h P a t e l14-Aug-07 0:48 
GeneralRe: Slow UI updation problem Pin
Luc Pattyn14-Aug-07 1:46
sitebuilderLuc Pattyn14-Aug-07 1:46 
QuestionHow can i know the return code of Com Interop? Pin
Yanshof13-Aug-07 22:40
Yanshof13-Aug-07 22:40 
AnswerRe: How can i know the return code of Com Interop? Pin
Pete O'Hanlon14-Aug-07 5:09
mvePete O'Hanlon14-Aug-07 5:09 
QuestionOpen an excel file Pin
sujithkumarsl13-Aug-07 22:29
sujithkumarsl13-Aug-07 22:29 
AnswerRe: Open an excel file Pin
Giorgi Dalakishvili13-Aug-07 22:39
mentorGiorgi Dalakishvili13-Aug-07 22:39 
GeneralRe: Open an excel file Pin
sujithkumarsl13-Aug-07 22:59
sujithkumarsl13-Aug-07 22:59 
GeneralRe: Open an excel file Pin
Giorgi Dalakishvili13-Aug-07 23:03
mentorGiorgi Dalakishvili13-Aug-07 23:03 
GeneralRe: Open an excel file Pin
sujithkumarsl13-Aug-07 23:07
sujithkumarsl13-Aug-07 23:07 
GeneralRe: Open an excel file Pin
Giorgi Dalakishvili13-Aug-07 23:10
mentorGiorgi Dalakishvili13-Aug-07 23:10 
AnswerRe: Open an excel file Pin
Parwej Ahamad13-Aug-07 23:02
professionalParwej Ahamad13-Aug-07 23:02 
AnswerRe: Open an excel file Pin
Ariadne14-Aug-07 3:21
Ariadne14-Aug-07 3:21 

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.