Busy .NET control repaint color

  • Thread starter Thread starter Alberto Bencivenni
  • Start date Start date
A

Alberto Bencivenni

Hi All,

Did you ever see a control very busy doing something: yes it is
usually completely white and the wait cursor is spinning.

We are looking for a trick to change the solid white color with the
parent background color. We tried changing the BackColor to something
different but didn't help.

Any idea?

Thanks,

Alberto
 
Hi All,

Did you ever see a control very busy doing something: yes it is
usually completely white and the wait cursor is spinning.

We are looking for a trick to change the solid white color with the
parent background color. We tried changing the BackColor to something
different but didn't help.

Any idea?

Thanks,

Alberto


It's completely white because it's too busy to handle painting itself.

I think you'd be better off figuring out how to do the busy work
without blocking the UI thread.

Marc
http://nomagichere.blogspot.com
 
Hi Guys,

Sorry for the delay but I lost this first post.

We can't help the control because it is interacting in a complex
infrastructure.

Just wanted to know if there is a way to do it. If we set the form
background color to Gray we get the form filled in black... Why?!?

Thanks,

Alberto
 
Glen,

The DoEvents suggestion is nice, what happend if we call
Application.DoEvent from inside a UserControl DLL: will it flush only
the DLL events or all the application ones?

Suppose you are filling a listbox with millions of items, what happens
if you call Application.DoEvents every AddItem? Will the speed
decrease considerably?

Thanks,

Alberto
 
Alberto Bencivenni said:
Glen,

The DoEvents suggestion is nice, what happend if we call
Application.DoEvent from inside a UserControl DLL: will it flush only
the DLL events or all the application ones?

Suppose you are filling a listbox with millions of items, what happens
if you call Application.DoEvents every AddItem? Will the speed
decrease considerably?

Thanks,

Alberto


If you are filling a listbox with millions of items, then look at
ListBox.BeginUpdate & ListBox.EndUpdate. I would question whether a user
can select an item adequately well from a listbox with a million items.
 
Mike,

The listbox was an example, of course. BTW, it looks like a provident
usage of DoEvents will help a lot.

Thanks again for the suggestion.

Alberto
 
Back
Top