|
You're updating every millisecond? You physically won't be able to see those changes so it is much more reasonable to expect your design to refresh every n milliseconds (you determine n), and log the data to an external source.
A better design though, would be to have each item exposed as a bindable object, and have a check on your property to say (effectively) if my new value is different from my old value, then update my new value and raise a PropertyChanged event on that property. This way, only those values that change get updated. Take a look at INotifyPropertyChanged for guidance on how to do this.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
getnanda@gmail.com wrote: updation of the values with millisecond accuracy is required
Are you planning to update the monitors too because a typical monitor will refresh the screen only one and three quarter times in the current time it takes to update all the text boxes.
If you update textboxes every millisecond the monitor will only have got 6% the way through a refresh before the thing is updated.
I really think some pragmatism is required here.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
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.
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
|
|
|
|
|
I don't know who voted you a "1", but this suggestion would get far better performance than updating 400 textbox's (BTW, ridiculous!) individually.
|
|
|
|
|
such is life
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
|
|
|
|
|
Don't worry, I five voted to balance this. Oh and point 3 was me.;P
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
So I returned the favor...
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
|
|
|
|
|
Why thank you kind sir - but there was no need. I just thought your well balanced and well argued post needed to be 5ed.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi,
Use Temperory Table. Save all textbox values into that table. And finally use TableMapping for updating the Original database table.
Naresh Patel
|
|
|
|
|
Are you suggesting to use a database in order to speed things up
That's a novel approach...
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
|
|
|
|
|
When i call from C# some com - i need to know if i got S_OK or S_FAIL or S_FALSE -
How can i do it ?
I try to use Marshal object but how can i cant find it.
Thanks for any help.
|
|
|
|
|
If it's raised via a COMException, you just catch that. There is a gotcha however. See link[^].
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
hi, i have a c# windows application, from which the details can be exported to a Excel file. after exporting the application ask "Do you want to see the file". suppose the user clicks "yes", i want to show the file....
How can i open the file from the application?
My small attempt...
|
|
|
|
|
You can use OleDb driver to retrieve the data and display it using datagridview
|
|
|
|
|
What is this? please go through the question before you answer..... ok?
My small attempt...
|
|
|
|
|
I explained how you can show data from excel file in your application. If you want to open ms excel then use Process class and specify the path of file you want to open.
|
|
|
|
|
i just want to open the Excel file.... as (double cick).............. just to see the file
My small attempt...
|
|
|
|
|
Have a look at Process class
|
|
|
|
|
|
you can also take a look here.
Your problem is perhaps not so simple as you assume....
Ariadne
|
|
|
|
|
It was very easy and i did that.................
Process.Start(d:/..../sample.xls);
will solve the probelm
My small attempt...
|
|
|
|
|
Can any one help me how to do the validation for the Dynamically added control in the page which need to be validate?
for example i need to validate the textbox is empty ot not if empty i need to alert the user fill it out.
With Regards
Ganesan.S
Software Engineer
|
|
|
|
|
Hi,
Yaar use RequiredFieldValidator.
But before it add attribute runat, server for the dynamically added control -here your textbox.
Naresh Patel
|
|
|
|
|
Hi,
Thanks yaar,
We used javascript to validate the dynamic control by getting it's Content ID which will create at runtime.
With Regards
Ganesan.S
Software Engineer
|
|
|
|
|
HELLO Friends,
My objective is to make a neive compiler as my semester project!
i have decided to make compiler which is capable of converting C-language to
C# (it will convert some basic codes not the complete language).
According to the requirments i have to present a documentation of my project in such a way that it includes complete lexical analysis(class and value part table) of my compiler.
I just need an idea which can lead me to the begining of the documentation.
If anybody can tell me as soon as possible i will be very thankful!
THANKING YOU!
Regards,
SANA.
$@N@
|
|
|
|