Form Paint Event not firing

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
 
S

sean_going

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
 
N

Nebo

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?
 
S

Simon Hart [MVP]

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top