Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Paint event doesn't fire
Message
General information
Forum:
ASP.NET
Category:
Forms
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01497337
Message ID:
01497428
Views:
42
>>>Anyone give me a reason why the paint event on a MDIContainer form doesn't fire ?
>>
>>Nothing to paint :-}
>>Seriously, I can't think of any other obvious reason - are you saying that it *never* fires of just doesn't fire when you are expecting it to?
>
>As far as I can tell it never fires - I am just playing around with pens and brushes ( I know - some people have too much time ) and noticed that if IsMDIContainer is true the OnPaint event doesn't fire - set it to false and it does. It's not a showstopper for me but I can't think of a reason why this should be.

I think it must just be that you're expecting a paint when it isn't required. Try something like this in the Paint event, drag another form over it and see what happens:
private void MDIParent1_Paint(object sender, PaintEventArgs e)
        {
                 System.Media.SystemSounds.Beep.Play();
        }
You should 'hear' the Paint event firing when any area is invalidated....
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform