Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to pickup _screen windowstate change?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00085679
Message ID:
00085931
Vues:
31
>> BTW, that number is based on most monitors these days running at 70hz, and is a guess on my part (supported by some testing). I'm assuming that Windows sends a WM_PAINT message to all displayed windows immediately after the VBI.
>
>I don't think that the vertical refresh rate of a monitor is related to Paint events. The former is a hardware "repainting" performed by the video card. The latter is a software event that occurs when a form or toolbar is repainted. A form or toolbar is repainted when part or all of the form or toolbar is exposed after it has been moved or sized, or after a window that was covering the form or toolbar has been moved. Using a Refresh method in a Resize event forces repainting of the entire object every time a user resizes the form or toolbar.

You're absolutely right. Bad testing on my part. I updated a label in the paint event, which, of course, caused paint to fire again, ad infinitum. Interestingly enough. If you resize a form and make it smaller, paint doesn't fire, but if you make it larger, it does. Further, it doesn't fire if you move the form.

However, it does still leaves open the problem. Unfortunately, it doesn't appear as if any of the events fire when the _SCREEN is resized. It would seem that the only way to handle the problem is to add a timer to the form.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform