|
-
Feb 6th, 2000, 05:36 PM
#1
Thread Starter
Hyperactive Member
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
-
Feb 6th, 2000, 11:51 PM
#2
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|