OK, I am using the following...
Now this works fine. The ListView does not update till all items have been added, which speeds the application up. This is what I want...HOWEVER, if while loading I select another form, which makes it active, from the same application the ListView becomes "UnLocked"! And the user can see the items being added!VB Code:
Private Declare Function LockWindowUpdate Lib "user32" Alias "LockWindowUpdate" (ByVal hwndLock As Long) As Long Private Sub LoadData ListView1.ListItems.Clear DoEvents LockWindowUpdate ListView1.hWnd 'Load data code, to big and irrelavant to post here :D LockWindowUpdate False End Sub
How can I get around this?
Wokawooooo
I understand that you can lock only one window at a time, but the only window I lock in my app is the ListView. Why does it get "Unlocked"...???
![]()





Reply With Quote