T
Tom P.
I am controlling the painting of my custom control. When the text
changes I grow the control and then repaint it accordingly.
I have several other processes that are running on independent threads
but they are updating objects in the listview, not my custom control.
I am getting "System.ArgumentException: Parameter is not valid."
during the following two lines (in two different methods no less):
OnTextChanged:
int StringWidth = CurrentGraphic.MeasureString(this.Text,
this.Font).ToSize().Width;
OnPaint:
pevent.Graphics.DrawString(this.Text, this.Font, Brushes.Black,
this.ClientRectangle.X, this.ClientRectangle.Y + 4);
But when the Debugger stops the code everything I point to has value.
How do I find my problem and what could be causing it yet not show up
in the debugger?
Should I not nest? Do each step one by one?
Thanks for anything.
Tom P.
changes I grow the control and then repaint it accordingly.
I have several other processes that are running on independent threads
but they are updating objects in the listview, not my custom control.
I am getting "System.ArgumentException: Parameter is not valid."
during the following two lines (in two different methods no less):
OnTextChanged:
int StringWidth = CurrentGraphic.MeasureString(this.Text,
this.Font).ToSize().Width;
OnPaint:
pevent.Graphics.DrawString(this.Text, this.Font, Brushes.Black,
this.ClientRectangle.X, this.ClientRectangle.Y + 4);
But when the Debugger stops the code everything I point to has value.
How do I find my problem and what could be causing it yet not show up
in the debugger?
Should I not nest? Do each step one by one?
Thanks for anything.
Tom P.