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 });
}