all groups > dotnet compact framework > may 2007 >
You're in the

dotnet compact framework

group:

OnPaintBackground not called on a form



OnPaintBackground not called on a form neemarr NO[at]SPAM gmail.com
5/29/2007 7:13:00 PM
dotnet compact framework: On a smartphone (C#, Compact Framework 2 SP1) project and trying to
add a background image to my form. So I do override the
OnPaintBackground method and the method is never called. I tried to do
an invalidate on the OnActivated event but...even if I add an event
handler for the OnPaint event, that even handler won't get called
either.

Can somebody tell me what I need to do so that method gets called, or
is there another way to display the image in my forms background.
Re: OnPaintBackground not called on a form neemarr NO[at]SPAM gmail.com
5/30/2007 4:34:58 PM
The solution was one of those why did I spend a whole day trying to
figure out somethign so simple.

I had a control (a listview in this case) that had its Dock property
set to DockStyle.Fill, well there is no background to paint when there
is something that is taking over the entire frame.
AddThis Social Bookmark Button