
Listview is flickering during Listitems.add
My guess is that you want to update listview subitems without flickering try
this
public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal
hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As
Long
public Type LV_ITEM
mask As Long
Index As Long
SubItem As Long
State As Long
StateMask As Long
Text As String
TextMax As Long
Icon As Long
Param As Long
Indent As Long
End Type
public Const LVIF_TEXT As Long = 1
Sub SetItm(aStr As String, iIndex As Long, iCol As Long)
Dim lvi As LV_ITEM
With lvi
.Index = iIndex
.SubItem = iCol
.Text = aStr
.mask = LVIF_TEXT
.TextMax = Len(aStr)
End With
Call SendMessage(frmLVStyles.ListView1.hWnd, LVM_SETITEM, 0&, lvi)
End Sub
I just copied some code from some of my application maybe you have to
laborate with the public statement
depending where you place the code
Best regards
Klas Hagelqvist