>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