Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Paint event doesn't fire
Message
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01497337
Message ID:
01497428
Vues:
45
>>>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....
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform