471,310 Members | 961 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,310 software developers and data experts.

Highlighting Text (at high volume)

Hi,

I am developing an application which highlights changes in streaming
data (i.e. market changes.)

I have developed this initially using the BackColor and ForeColor
settings on the relevant Rectangle object which needs to be
highlighted. This works, however, as the volume of changes increase,
the CPU consumed becomes too high to be acceptable. (60% +)

I have thought about overlaying a BMP object over the existing text,
however, I am not sure a) what the best method is for doing this b) if
this method will significantly decrease CPU consumption.

Has anyone run into this issue before? Any ideas??

As an example, this is how I would set the relevant region back to its
initial state (Black backgroud with Gray text)

Thanks for any help.

Mike


formElements.MainForm.tableModel1.Rows[idxRow].Cells[formElements.iMktAskIdx].BackColor
= Color.Black;

formElements.MainForm.tableModel1.Rows[idxRow].Cells[formElements.iMktBidIdx].BackColor
= Color.Black;

formElements.MainForm.tableModel1.Rows[idxRow].Cells[formElements.iODLAskIdx].BackColor
= Color.Black;

formElements.MainForm.tableModel1.Rows[idxRow].Cells[formElements.iODLBidIdx].BackColor
= Color.Black;
formElements.MainForm.tableModel1.Rows[idxRow].Cells[formElements.iMktAskIdx].ForeColor
= Color.SlateGray;

formElements.MainForm.tableModel1.Rows[idxRow].Cells[formElements.iMktBidIdx].ForeColor
= Color.SlateGray;

formElements.MainForm.tableModel1.Rows[idxRow].Cells[formElements.iODLAskIdx].ForeColor
= Color.SlateGray;

formElements.MainForm.tableModel1.Rows[idxRow].Cells[formElements.iODLBidIdx].ForeColor
= Color.SlateGray;

invalidatedRow.X =
formElements.MainForm.table1.CellDataRect.X;
invalidatedRow.Y =
formElements.MainForm.table1.CellDataRect.Y + (idxRow *
formElements.MainForm.table1.RowHeight);
invalidatedRow.Height =
formElements.MainForm.table1.RowHeight;
invalidatedRow.Width =
formElements.MainForm.table1.CellDataRect.Width;
if (formElements.MainForm.InvokeRequired)
{
//formElements.MainForm.Refresh();
formElements.MainForm.BeginInvoke(new
QMGUI.Dealer.EventSink.d_InvalidateForm(Invalidate Form), new object[] {
formElements.MainForm, invalidatedRow });
formElements.MainForm.BeginInvoke(new
QMGUI.Dealer.EventSink.d_UpdateForm(UpdateForm), new object[] {
formElements.MainForm });
}

Jan 16 '06 #1
0 901

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Irmen de Jong | last post: by
5 posts views Thread by Adelson Anton | last post: by
2 posts views Thread by Arsen V. | last post: by
2 posts views Thread by =?Utf-8?B?RGFtZW9u?= | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.