Form Paint Event not firing

  • Thread starter Thread starter Nebo
  • Start date Start date
N

Nebo

I have a form (VB.NET) with lots of controls on it. I recently added a
form paint event and for some reason the form paint event is never
called. Does anyone have an idea why this might be the case?

What circumstances would prevent a form paint event from being fired?

Thanks
 
I have a form (VB.NET) with lots of controls on it. I recently added a
form paint event and for some reason the form paint event is never
called. Does anyone have an idea why this might be the case?

What circumstances would prevent a form paint event from being fired?

Thanks

The only time i've seen this happen is when there are controls
covering the entire bounds of the form.
Since there's nothing to paint (the form is essentially covered) the
paint event does not get raised.
If you have even one pixel not covered by controls, the paint event
should fire.

-Dog
 
There is a lot of code. So here is what I have done. I revealed some
of the form. And I can see the drawing is occuring on the form.
However, if there are controls, the controls sit above the form and
cover the drawing.

So is it possible to draw above other controls from the form level?
 
Only if the controls support it. If you're drawing to the surface of the
form, and there are controls over the top of the form, then you will not see
your drawn objects.

What is it you are trying to do?
 
Back
Top