Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to Lock a Form while updating controls
Message
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00309610
Message ID:
00309621
Vues:
22
>Is it possible to lock a form while I add nodes and listitems to a treeview and listview control. I am a new VB programmer however I have been programming in VFP for several years. In VFP the form has a LockScreen property for this. I need to do this to make my updates to the form look nicer!!!


Add this declaration in the "General Declarations" section:

Private Declare Function LockWindowUpdate _
Lib "user32" _
(ByVal hwndLock As Long) As Long


Before you add things to the treeview, call this the function this way:
LockWindowUpdate TreeView1.hWnd

And after all your additions have been made, use this to unlock screen update:
LockWindowUpdate 0&
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform