-
Is the anyway to stop the whole listview from refreshing everytime I add (or edit) an item? I need to listview to update very quickly, at the moment its pretty slow (due to refreshing every time??)
Is there an alternative to a list view that is faster? I have considered using a print method with some sort of sorting, but this is very messy. Any ideas?
Cheers
-
The best way to achieve what you want is to use LockWindowUpdate API.
Code:
Private Declare Function LockWindowUpdate Lib "user32" Alias "LockWindowUpdate" (ByVal hwndLock As Long) As Long
Public Sub Command1_Click()
Dim xListItem As listItem
Dim i As Integer
With ListView1
Call LockWindowUpdate(.Hwnd)
For i = 1 To 50
Set xListItem = .ListItems.Add(,,, "ListItem" & i)
Next
'Unlock Control
Call LockWindowUpdate(0)
End With
End Sub
------------------
Serge
Senior Programmer Analyst
[email protected]
[email protected]
ICQ#: 51055819