I'm using VB5, How I will avoid the Flicker in a ListView Control when I update it?
Anybody have an Idea
Thanks
Printable View
I'm using VB5, How I will avoid the Flicker in a ListView Control when I update it?
Anybody have an Idea
Thanks
eliminate or reduce
Doevents
if you have them
I am not using do events anywhere but it is still flickering
There is an api (Lockwindow) you can use to lock the graphic update on your form (if it is a Child one, lock the Mdi, not the Child). Locking graphic before and unlocking after the update, will avoid all kind of flickering.
(remeber: to unlock = pass False to the api
and you cannot lock more than one window each time)
The api is
Private Declare Function LockWindowUpdate Lib "user32" (ByVal hwndLock As Long) As Long
To unlock:
LockWindowUpdate False
Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris, Dr_Michael
and all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
The Rater