Re: Blinking in listview
- From: fajp@xxxxxxxxxxxxxxxxxxxx (Frank Adam)
- Date: Wed, 30 Nov 2005 15:31:02 +1100
On Wed, 30 Nov 2005 12:01:16 +0800, "Henry" <Kherny@xxxxxxxxxxxxxx>
wrote:
>Hi, I use a listview to update data from a server every second and it keeps
>on blinking as the data is refresh and the cursor jumps to the first row
>even if I click other row.
>
>Is there other way to display data every second without blinking? thanks
>
Try this. It probably won't get rid of all the flicker, but should
help reduce it.
Option Explicit
Private Declare Function LockWindowUpdate Lib "user32" (ByVal hwndLock
As Long) As Long
Private Sub Timer1_Timer() 'timer to 1000ms
Static ct As Long
Dim lvi As ListItem
Set lvi = LV.SelectedItem
LockWindowUpdate LV.hWnd
LV.ListItems.Add , "C" & ct, ct
Set LV.SelectedItem = lvi
LockWindowUpdate 0
ct = ct + 1
End Sub
--
Regards, Frank
.
- References:
- Blinking in listview
- From: Henry
- Blinking in listview
- Prev by Date: Blinking in listview
- Next by Date: Re: Clip capture
- Previous by thread: Blinking in listview
- Next by thread: Re: Blinking in listview
- Index(es):