CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Guest

    Avoid flicker in a ListView

    I'm using VB5, How I will avoid the Flicker in a ListView Control when I update it?
    Anybody have an Idea
    Thanks


  2. #2
    Join Date
    Jul 2000
    Location
    Hawaii
    Posts
    281

    Re: Avoid flicker in a ListView

    eliminate or reduce

    Doevents

    if you have them


  3. #3
    Join Date
    Oct 2001
    Posts
    5

    Re: Avoid flicker in a ListView

    I am not using do events anywhere but it is still flickering


  4. #4
    Join Date
    May 2001
    Location
    domodossola,italy
    Posts
    10

    Re: Avoid flicker using api

    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)



  5. #5
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    Re: Avoid flicker using api

    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
    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured