Avatar of isnoend2001
isnoend2001
Flag for United States of America asked on

Problem msflexgrid flickering

I am trying to update a 8 row 10 column msflexgrid, but cannot stop the flicker in the cells
setting the autodraw to false then true helps, but does not stop it completely.
How can this be fixed ?
the code
 Sub ResetBoard() 'reset all the cells back to form load(imgCellBG.Picture)
 Dim r As Integer
    Dim c As Integer
    flexCleo.Redraw = False
    DoEvents
    For c = 0 To 9
    For r = 0 To 7
    With flexCleo
    .Col = c
    .Row = r
   
      .CellForeColor = vbWhite '.CellPicture = imgHitUnSelected.Picture
    Set .CellPicture = imgCellBG.Picture
     
    End With
    Next
    Next
    flexCleo.Redraw = True
 End Sub

Open in new window

Visual Basic Classic

Avatar of undefined
Last Comment
Martin Liss

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Martin Liss

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
isnoend2001

ASKER
Good job
Thanks MartinLiss
Martin Liss

You're welcome and I'm glad I was able to help.

Marty - MVP 2009 to 2013
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy