Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Lock form refresh on lenghty Load()
Message
De
09/12/1999 17:15:54
 
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Divers
Thread ID:
00299943
Message ID:
00301359
Vues:
25
>In VB, setting the Visible and Enabled properties for False will disable the
>WM_PAINT processing for a form. As long as you don't doevents, your form won't physically disappear. Also, I know there was a LockWindow API call that I saw once, but damn if I can find it anywhere!
>
>
>>>>What is the property to prevent repaint of form while a lenghty process is active? Right now the form repaints somewhat slow and it looks dirty. TIA
>>>
>>>To force the form to show rapidly, you can add:
>>>Me.Show
>>>DoEvents
>>>
>>>at the beginning of your Form_Load.
>>
>>That didn't work. In VFP there's the LockScreen property that when set to True prevents any refresh to the form, so you may change a bunch of the visual settings at one time and not until it's finished set LockScreen back to false so it repaints everything only once. Is there an equivalent property in VB or some other trick to achieve this? TIA

Thanks Ed! That worked. FWIW, what I am doing is when I need to bring up this form (Enabled=False & Visible=False) is I do a phony reference to any of its controls which runs its load event. As the two last lines of the load event I do Enabled=True & Visible=True.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform